| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>通话记录管理</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/bootstrap-select.css" />
- <link rel="stylesheet" href="../css/Table/table1.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <style>
- body {
- font-family: "微软雅黑";
- font-size: 14px;
- }
- /* ul li {
- list-style: none;
- float: left;
- } */
- .fr {
- float: right;
- }
- .fl {
- float: right;
- }
- /*标头*/
- .th-box {
- width: 100%;
- padding: 5px;
- border-bottom: 1px solid #e7eaec;
- }
- .sc_btn {
- width: 100px;
- color: #fff;
- font-size: 12px;
- margin-left: 15px;
- box-sizing: border-box;
- background: #00a1cb;
- padding: 6px 10px;
- outline: none;
- border-width: 0px;
- border-style: initial;
- border-color: initial;
- border-image: initial;
- border-radius: 3px;
- margin-top: 5px;
- text-align: center;
- }
- .photo {
- /*background-color: #FFF;
- background-image: none;*/
- border: 1px solid #e5e6e7;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px;
- }
- .selects {
- background-color: #FFF;
- background-image: none;
- border: 1px solid #e5e6e7;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px;
- }
- #Select:focus {
- outline: none;
- border-color: #00BFFF;
- }
- input:focus {
- outline: none;
- border-color: #00BFFF;
- }
- .spiner-example {
- position: absolute;
- top: 50%;
- left: 50%;
- z-index: 111;
- margin-left: -85px;
- margin-top: -100px;
- display: none;
- }
- .sk-spinner-three-bounce {
- width: 170px !important;
- }
- .sk-spinner p {
- display: inline-block;
- font-size: 18px;
- margin-left: 10px;
- }
- .gjsu ul {
- overflow: hidden;
- }
- .gjsu ul li {
- width: 50%;
- margin-bottom: 5px;
- padding-top: 10px;
- }
- .selects {
- width: 105px;
- }
- .tc {
- margin-top: 30px;
- text-align: center;
- }
- #sqzx th {
- padding: 5px 8px 5px 0;
- text-align: center;
- width: 6%;
- }
- #sqzx td {
- padding: 6px 0 5px 10px;
- width: 18%;
- }
- .nameJustified {
- width: 5em;
- display: inline-block;
- text-align: justify;
- text-align-last: justify;
- }
- .dropdown-menu li {
- width: 100%;
- }
- .operation {
- white-space: nowrap;
- }
-
- .Min-width{
- width: 48%;
- display: inline-block;
- margin: 0;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>><a
- href="javaScript:;">话务管理</a>><a href="" class="nowPosition">通话记录查询</a></sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div class="th-box">
- <div class="box_content">
- <table id="sqzx" style="width: 100%" border="0">
- <tbody>
- <tr>
- <th>电话号码:</th>
- <td><input id="tel" class="form-control" type="text" /></td>
- <th>呼叫状态:</th>
- <td>
- <select id="ss_hjzt" class="callstate form-control">
- <option value="">全部</option>
- <option value="0">未接通</option>
- <option value="1">已接通</option>
- <option value="2">接通未达</option>
- <option value="3">主动放弃</option>
- <option value="4">自主完成</option>
- </select>
- </td>
- <th><span class="nameJustified">分机号:</span></th>
- <td>
- <input id="extnumber" class="form-control" type="text" />
- </td>
- <th>呼出方向:</th>
- <td>
- <select id="ss_hcfx" class="form-control calltype">
- <option value="">全部</option>
- <option value="0">呼入</option>
- <option value="1">呼出</option>
- <option value="3">呼出回访</option>
- </select>
- </td>
- </tr>
- <tr>
- <th>呼叫类型:</th>
- <td>
- <select id="ss_HJLX" class="form-control calltype">
- <option value="">全部</option>
- <option value="1">正常通话</option>
- <option value="2">转移</option>
- <option value="3">三方通话</option>
- </select>
- </td>
- <th>是否回访:</th>
- <td>
- <select id="sf_hf" class="form-control calltype">
- <option value="">全部</option>
- <option value="2">是</option>
- <option value="0">否</option>
- </select>
- </td>
- <th>受话坐席:</th>
- <td class="maxWidthSelect">
- <select id="seat" class="selectpicker show-tick form-control" multiple data-live-search="true"></select>
- </td>
- <th>通话类型:</th>
- <td>
- <select id="callType" class="form-control callstate">
- <option value="">全部</option>
- </select>
- </td>
- </tr>
- <tr>
- <th>电话类别:</th>
- <td>
- <select class="form-control" id="phoneType">
- <option value="">请选择</option>
- </select>
- </td>
- <th>查询类型:</th>
- <td>
- <select id="islike" class="form-control" name="select">
- <option value="1">模糊查询</option>
- <option value="0">精确查询</option>
- </select>
- </td>
- <th><span class="nameJustified">时间:</span></th>
- <td colspan="3">
- <input id="start" class="photo x-color laydate-icon" type="text" autocomplete="off" /> -
- <input id="end" class="photo x-color laydate-icon" type="text" autocomplete="off" />
- <a class="sc_btn Ss">搜索</a>
- <a class="sc_btn exportFile">导出</a>
- </td>
- </tr>
- <tr>
- <th><span class="nameJustified">坐席组:</span></th>
- <td>
- <select id="agentGroup" class="form-control" name="select">
- <option value="">请选择</option>
- </select>
- </td>
- <th><span class="nameJustified">未接通:</span></th>
- <td>
- <select id="notconnected" class="form-control" name="select">
- <option value="">请选择</option>
- <option value="1">呼入至今未接通</option>
- </select>
- </td>
- <th>是否回拨</th>
- <td>
- <select id="callback" class="form-control" name="select">
- <option value="">请选择</option>
- <option value="1">已回拨</option>
- <option value="2">未回拨</option>
- </select>
- </td>
- </tr>
- <tr>
-
- <th><span>等待时长:</span></th>
- <td >
- <input id="WaitTime" class="form-control Min-width" type="text"placeholder="输入数字,单位s"/>
- <select id="WaitTimeState" class="form-control Min-width" name="select">
- <option value="">等于</option>
- <option value="1">大于</option>
- <option value="2">小于</option>
- </select>
- </td>
- <th><span>满意度:</span></th>
- <td >
- <select id="myd" class="form-control" name="select">
- <option value="">请选择</option>
- <option value="0">未评价</option>
- <option value="1">满意</option>
- <option value="2">一般</option>
- <option value="3">不满意</option>
- </select>
- </td>
- <th><span>电话方式:</span></th>
- <td >
- <select id="Business" class="form-control" name="select">
- <option value="">请选择</option>
- <option value="1">疫情咨询</option>
- <option value="2">市民咨询</option>
- <option value="3">营商环境</option>
- <option value="4">涉疫事项</option>
- </select>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-field="" data-align="center" data-formatter="Code">编号</th>
- <th data-field="CallNumber" data-align="center" data-formatter="formatterCallNum">电话号码</th>
- <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
- <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
- <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
- <th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>
- <th data-field="TypeName" data-align="center">通话类型</th>
- <th data-field="MYD" data-align="center" data-formatter="MYD">满意度</th>
- <th data-field="UserCode" data-align="center">坐席工号</th>
- <th data-field="UserName1" data-align="center">坐席姓名</th>
- <th data-field="ExtNumber" data-align="center">分机号</th>
- <th data-field="BeginTime" data-align="center">开始时间</th>
- <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
- <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
- <th data-field="EndTime" data-align="center">结束时间</th>
- <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
- <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
- <th data-field="WaitTime" data-align="center">等待时长</th>
- <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
- <th data-field="PhoneType" data-align="center">电话类别</th>
- <th data-field="TransferCall" data-align="center">转接号码</th>
- <th data-field="Business" data-align="center" data-formatter="formatBusinessType">电话方式</th>
- <th data-field="Callback" data-align="center" data-formatter="formatCallback">是否回拨</th>
- <th data-field="WorkOrderId" data-align="center" data-formatter="formatWorkOrderNum">工单号</th>
- <th data-field="CallId" data-align="center" data-formatter="operationFormatter">操作</th>
- </tr>
- </thead>
- </table>
- <!--高级搜索框-->
- </div>
- </div>
- <!--下载框-->
- <div class="t-shade">
- <div class="shade_k">
- <div class="shade_title">
- <span>录音播放<srong class="cknum"></srong></span>
- <span class="setwin"><a>x</a></span>
- </div>
- <div class="shade_content">
- <div class="Ly_box audiojs">
- </div>
- <div class="boxCon LY_box">
- </div>
- </div>
- </div>
- </div>
-
- <script src="../js/bootstrap-select.js"></script>
- <script src="../My97DatePicker/WdatePicker.js"></script>
- <script src="../css/laydate/laydate.js"></script>
- <!-- <script src="../js/main.js"></script> -->
- <script src="../js/guid.js"></script>
- <!--<script src="../js/contabs.min.js"></script>-->
-
- <script>
- var stype = 1;
- var seatlist = [];
- $(document).ready(function () {
- laydate.skin('blue');
- laydate({
- elem: '#start',
- event: 'focus',
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- laydate({
- elem: '#end',
- event: 'focus',
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- /*获取选中行对象*/
- $('#list').on("click-row.bs.table", function (e, row, ele) {
- $('.success').removeClass('success'); //去除之前选中的行的,选中样式
- $(ele).addClass('success'); //添加当前选中的 success样式用于区别
- });
- $(".setwin").click(function () {
- $(".t-shade").removeClass("cx");
- $('audio')[0].pause();
- });
- //获取通话类型
- GetCallTypeList();
- //获取坐席
- getAgentGroup($("#agentGroup"));
- //获取坐席
- $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
- token: $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- seatlist = result.data;
- bindseat($("#seat"));
- }
- });
- // 电话类别
- getPhoneType($("#phoneType"));
- //搜索
- $(".Ss").click(function () {
- stype = 1;
- initTable();
- });
- //高级搜索s
- $(".Gj").click(function () {
- var a = "WdatePicker()";
- layer.open({
- type: 1,
- title: '高级搜索',
- area: ['50%', '55%'], //宽高
- content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
- '<li class="active"><a href="#">参数信息</a></li> ' +
- '</ul>' +
- '<ul>' +
- '<li>' +
- '<label for="">电话号码:</label>' +
- '<input type="text" id="ss_tel" class="photo"/>' +
- '</li>' +
- '<li>' +
- '<label for="">坐席工号:</label>' +
- '<select name="" id="ss_seat" class="selects usercode"></select>' +
- '</li>' +
- '<li>' +
- '<label for="">开始时间:</label>' +
- ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
- '</li>' +
- '<li>' +
- '<label for="">呼叫状态:</label>' +
- '<select id="ss_hjzt" class="selects callstate">' +
- '<option value="">全部</option>' +
- '<option value="0">未接通</option>' +
- '<option value="1">已接通</option>' +
- '<option value="2">黑名单拒接</option>' +
- '</select>' +
- '</li>' +
- '<li>' +
- '<label for="">结束时间:</label>' +
- '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
- '</li>' +
- '<li>' +
- '<label for="">呼出方向:</label>' +
- '<select id="ss_hcfx" class=" selects calltype">' +
- '<option value="">全部</option>' +
- '<option value="0">呼入</option>' +
- '<option value="1">呼出</option>' +
- '</select>' +
- '</li>' +
- '</ul>' +
- '<div class=" add_time tc">' +
- '<button type="button" class="btn sc_btn Block " id="tc">保 存</button>' +
- '</div>' +
- '</div>'
- });
- bindseat($("#ss_seat"));
- //获取通话记录列表
- $("#tc").click(function () {
- stype = 2;
- initTable();
- var index = layer.index; //获取当前弹层的索引号
- layer.close(index); //关闭当前弹层
- });
- });
- initTable();
- })
- function bindseat(obj) {
- obj.empty();
- obj.append('<option value="">全部</option>');
- $(seatlist).each(function (i, n) {
- obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
- obj.selectpicker({
- noneSelectedText: '请选择' //默认显示内容
- });
- obj.selectpicker('refresh');
- })
- }
- /*
- 监听坐席数据变化
- 选中全部时候,取消其他选项
- clickedIndex:索引
- isSelected:是否选中
- previousValue:选中前的值
- */
- $("#seat").on("changed.bs.select", function (event, clickedIndex, isSelected, previousValue) {
- if (previousValue.indexOf("全部") == -1) {
- if (clickedIndex == 0) {
- $("#seat").selectpicker("deselectAll");
- $("#seat").val("");
- $("#seat").selectpicker('refresh');
- }
- } else {
- if (clickedIndex != 0) {
- $("#seat").selectpicker("deselectAll");
- $("#seat").val("");
- $("#seat").selectpicker('refresh');
- }
- }
- })
- function initTable() {
- //先销毁表格
- $('#list').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $("#list").bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
- contentType: "application/x-www-form-urlencoded",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- page: params.pageNumber,
- pagesize: params.pageSize,
- token: $.cookie("token")
- };
- var usercode_ = $("#seat").val(); //坐席
- var usercodeID = "";
- if (usercode_ != null) {
- $(usercode_).each(function (i, n) {
- var obj1 = "";
- obj1 = n + ",";
- usercodeID += obj1;
- });
- usercodeID = usercodeID.slice(0, -1);
- } else {
- usercodeID = "";
- }
-
- var WaitTimeState = $("#WaitTimeState").val()
- if(WaitTimeState ==="1"){
- param.morewaitTime = $("#WaitTime").val(); // 大于waitTime时长
- } else if(WaitTimeState ==="2"){
- param.lesswaitTime = $("#WaitTime").val(); // 小于waitTime时长
- } else{
- param.WaitTime = $("#WaitTime").val(); // 等待时长
- }
-
- if (stype == '1') {
- param.usercode = usercodeID;
- param.phone = $("#tel").val().replace(/\s+/g, "");
- param.starttime = $("#start").val();
- param.endtime = $("#end").val();
- param.callstate = $("#ss_hjzt").val();
- param.calltype = $("#ss_hcfx").val();
- param.type = $("#callType").val(); //type=通话类型
- param.actiontype = $("#ss_HJLX").val(); //呼叫类型
- param.tasktype = $("#sf_hf").val(); //呼叫类型
- param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
- param.phoneType = $("#phoneType").val();
- param.islike = $("#islike").val(); // 查询类型
- param.group = $("#agentGroup").val(); // 坐席组
- param.notconnected = $("#notconnected").val(); // 未接通
- param.callback = $("#callback").val(); // 是否回拨
- param.myd = $("#myd").val()
- param.Business = $("#Business").val()
-
- } else if (stype == '2') {
- param.usercode = $("#ss_seat").val();
- param.tel = $("#ss_tel").val();
- param.callstate = $("#ss_hjzt").val();
- param.calltype = $("#ss_hcfx").val();
- param.starttime = $("#ss_kssj").val();
- param.endtime = $("#ss_jssj").val();
- param.type = $("#callType").val(); //type=通话类型
- param.actiontype = $("#ss_HJLX").val(); //呼叫类型
- param.tasktype = $("#sf_hf").val(); //呼叫类型
- param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
- param.phoneType = $("#phoneType").val();
- param.islike = $("#islike").val(); // 查询类型
- param.group = $("#agentGroup").val(); // 坐席组
- param.notconnected = $("#notconnected").val(); // 未接通
- param.callback = $("#callback").val(); // 是否回拨
- param.myd = $("#myd").val()
- param.Business = $("#Business").val()
- }
- return param;
- },
- onLoadSuccess: function () { //加载成功时执行
- //layer.msg("加载成功");
- },
- onLoadError: function () { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //音频
- function setCode(val) {
- if (val) {
- return '<div class="imgs">' +
- '<img src="../img/vice.png" alt="" onclick="helper.luyin.view(this)" item="' + val + '" />' +
- '</div>';
- } else {
- return '';
- }
- }
- //编号
- function Code(val, row, index) {
- return index + 1;
- }
- // 电话号码
- function formatterCallNum(val, row) {
- var phoneNumber
- if (val.length === 12) {
- phoneNumber = val.slice(1)
- } else if (val.length === 13) {
- phoneNumber = val.slice(2)
- } else {
- phoneNumber = val
- }
- return '<div class="imgs" ><p class="" onclick="viewList(\'' + phoneNumber + '\')" >' + phoneNumber +
- '</p></div>';
- }
- // 查看列表
- // function viewList(phoneNumber) {
- // layer.open({
- // type: 2,
- // content: "./CallRecordList.html?phoneNumber=" + phoneNumber, //iframe的url,no代表不显示滚动条
- // title: '通话记录',
- // area: ['90%', '90%'], //宽高
- // });
- // }
- //方向呼出
- function callType(val) {
- if (val == 0) {
- return '<div class="imgs">呼入</div>';
- } else {
- return '<div class="imgs">呼出</div>';
- }
- }
- //满意度
- function MYD(val, row) {
- var html = '';
- switch (val + '') {
- case '0':
- html = '未评价';
- break;
- case '1':
- html = '满意';
- if (row.CallState == 0) {
- html = '';
- }
- break;
- case '2':
- html = '一般';
- break;
- case '3':
- html = '不满意';
- break;
- }
- return html;
- }
- function states(val, row) {
- if (val == 0) { //CallState
- if(row.CallType == 0){ //呼入
- if(row.Business==1||row.Business==4){
- return '<div class="imgs">自主完成</div>';
- }else if( !row.UserCode){
- return '<div class="imgs">主动放弃</div>';
- }else{
- return '<div class="imgs">未接通</div>';
- }
- }else{
- return '<div class="imgs">未接通</div>';
- }
- } else if (val == 1) {
- return '<div class="imgs">已接通</div>';
- } else if (val == 2) {
- return '<div class="imgs">接通未达</div>';
- }
- }
- function ActionType(val) {
- if (val == 2) {
- return '<div class="imgs">转移</div>';
- } else if (val == 3) {
- return '<div class="imgs">三方通话</div>';
- } else {
- return '<div class="imgs">正常通话</div>';
- }
- }
- //处理
- function isDeal(val) {
- if (val == 0) {
- return '<div >未处理</div>';
- } else {
- return '<div >已处理</div>';
- }
- }
- function ftime(val) {
- if (val) {
- return helper.DateFormat.getFormatTime(val);
- } else {
- return '';
- }
- }
- // 回拨
- function formatCallback(val, row) {
- if (val) {
- return "已回拨";
- } else if(row.CallType ===0&&row.CallState ===0){
- return "未回拨";
- }
- }
- //格式化工单号
- function formatWorkOrderNum(val, row) {
- if (row.CallType ===0) {
- if (val == null || val == '') {
- return '<a class="xg" onclick="addWorkOrder(\'' + row.CallRecordsId + '\',\'' +row.CallNumber+'\')" title="添加工单">添加工单</a>';
- } else {
- return '<a class="xg" onclick="ckxq(\'' + val + '\')" title="点击查看工单详情">' + val + '</a>';
- }
- }
-
- }
-
- function formatBusinessType(val, row){
- if (row.CallType ===0) {
- if (val ===1) {
- return '疫情咨询'
- } else if (val ===3) {
- return '营商环境'
- } else if (val ===4) {
- return '涉疫事项'
- }else {
- return '市民咨询'
- }
- }
- }
-
- // 操作
- function operationFormatter(val, row) {
- // CallType ===0呼入 row.CallState ===0 未接通
- if (row.CallState ===0&&row.CallType ===0) {
- if (row.Callback) {
- return '<a class="operation" onclick="callbackRecord(\'' + row.CallId + '\')" title="">回拨记录</a>'
- } else {
- return '<a class="operation" onclick="backDial(\'' + row.CallNumber + '\',\'' + row.CallId +'\')" title="">回拨</a>'
- }
- }
- }
-
- //获取通话类型
- function GetCallTypeList() {
- $.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListById', {
- id: 45,
- token: $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- var callTypeList = result.data;
- $('#callType').empty();
- $('#callType').append('<option value="">全部</option>');
- $(callTypeList).each(function (i, n) {
- $('#callType').append('<option value="' + n.F_ValueId + '">' + n.F_Value +
- '</option>');
- })
- }
- })
- }
- // 坐席
- function getAgentGroup(obj) {
- obj.empty();
- obj.append(
- '<option selected="selected" value="">请选择</option>'
- );
- $.getJSON(
- huayi.config.callcenter_url +
- "Dictionary/GetDicValueListById", {
- token: $.cookie("token"),
- id: 2522,
- },
- function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $(
- "<option value='" +
- n.F_Value +
- "'>" +
- n.F_Value +
- "</option>"
- ).appendTo(obj);
- });
- }
- }
- );
- }
- // 查看工单详情
- function ckxq(str) {
- if (str) {
- layer.open({
- type: 2,
- content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
- title: '工单详情',
- area: ['100%', '100%'], //宽高
- });
- }
- }
-
- // 添加工单
- function addWorkOrder(CallRecordsId,CallNumber) {
- if (CallRecordsId) {
- layer.open({
- type: 2,
- content: "../Appeal/AddAppeal.html?CallRecordsId=" + CallRecordsId+"&callerNum="+CallNumber , //iframe的url,no代表不显示滚动条
- title: '工单详情',
- area: ['100%', '100%'], //宽高
- });
- }
- }
- // 外呼
- function backDial(phoneNumber, callId) {
-
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
- async: true,
- dataType: "json",
- data: {
- token: $.cookie("token"),
- phone: phoneNumber,
- },
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- top.callbackState = true
- var guid = uuid();
- top.obj.Type = "MakeCall";
- top.obj.DestinationNumber = result.data.phone;
- top.obj.Header = result.data.fix;
- top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:回访外呼
- top.obj.TaskPhoneID = callId; //回访的电话ID
- top.obj.TaskID = guid; //回访记录编号
- top.obj.Callee = phoneNumber; //被叫号码
- top.obj.Caller = $.cookie("extno"); //操作人分机号
- top.Send();
- }
- },
- });
- }
- // 更新外呼记录前
- function beforeUpdateCallOut (callId) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Callrecords/UpdateCallback",
- async: true,
- dataType: "json",
- data: {
- token: $.cookie("token"),
- callid: callId,
- },
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- }
- },
- });
- }
- // 更新外呼记录后
- function afterUpdateCallOut (callId) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Callrecords/UpdateCallbackid",
- async: true,
- dataType: "json",
- data: {
- token: $.cookie("token"),
- callid: callId,
- p_callid: callId,
- },
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- }
- },
- });
- }
- // 回拨记录
- function callbackRecord(callId) {
- layer.open({
- type: 2,
- content: "./callbackRecordList.html?callId=" + callId, //iframe的url,no代表不显示滚动条
- title: '回拨记录',
- area: ['100%', '100%'], //宽高
- });
- }
- //电话类别
- function getPhoneType(obj) {
- obj.empty();
- $("<option value=''>请选择</option>").appendTo(obj);
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- id: 2498,
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Value + "'>" + n.F_Remark + "</option>")
- .appendTo(obj);
- })
- }
- }
- });
- }
- $(".exportFile").click(function () {
- var usercode_ = $("#seat").val(); //坐席
- var usercodeID = "";
- if (usercode_ != null) {
- $(usercode_).each(function (i, n) {
- var obj1 = "";
- obj1 = n + ",";
- usercodeID += obj1;
- });
- usercodeID = usercodeID.slice(0, -1);
- } else {
- usercodeID = "";
- }
- var usercode = usercodeID;
- var phone = $("#tel").val();
- var starttime = $("#start").val();
- var endtime = $("#end").val();
- var callstate = $("#ss_hjzt").val();
- var calltype = $("#ss_hcfx").val();
- var type = $("#callType").val(); //type=通话类型
- var actiontype = $("#ss_HJLX").val(); //呼叫类型
- var tasktype = $("#sf_hf").val(); //呼叫类型
- var extnumber = $("#extnumber").val();
- var phoneType = $("#phoneType").val();
- var islike = $("#islike").val(); // 查询类型
- var notconnected = $("#notconnected").val(); // 未接通
-
- var url = huayi.config.callcenter_url + "Callrecords/GetList?token=" + $.cookie("token") +
- "&isdc=1";
- url += "&usercode=" + usercode + "&phone=" + phone + "&starttime=" + starttime + "&endtime=" +
- endtime + "&callstate=" + callstate + "&calltype=" + calltype + "&type=" + type +
- "&actiontype=" + actiontype + "&tasktype=" + tasktype + "&extnumber=" + extnumber +
- "&phoneType=" + phoneType + "&islike=" + islike + "¬connected=" + notconnected;
- window.location.href = url;
- })
- document.onkeydown = function (e) { // 回车提交表单
- var theEvent = window.event || e;
- var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
- if (code == 13) {
- initTable();
- }
- }
- </script>
- </body>
- </html>
|