| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>任务报表</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../css/init.css" rel="stylesheet" />
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/Table/table1.css" rel="stylesheet" />
- <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
- <style>
- .LY:hover {
- color: #fff;
- }
-
- .LY:active {
- color: #fff!important;
- }
-
- #Task thead td {
- color: #fff;
- background-color: #1ab394;
- text-align: center;
- }
-
- .table-head table thead {
- width: calc( 100% - 5px);
- }
-
- table thead,
- tbody tr {
- display: table;
- width: 100%;
- table-layout: fixed;
- text-align: center;
- }
-
- .table {
- margin-bottom: 0;
- }
-
- .table-body {
- width: 100%;
- height: 515px;
- overflow-y: scroll;
- overflow-x: scroll;
- }
-
- .seach-box ul {
- overflow: inherit;
- }
-
- .dropdown-menu li {
- float: none;
- }
-
- .bootstrap-select.btn-group:not(.input-group-btn),
- .bootstrap-select.btn-group[class*="col-"] {
- width: 150px !important;
- }
-
- .bootstrap-select .dropdown-toggle:focus,
- .form-control:focus,
- .single-line:focus {
- outline: none !important;
- border: 1px solid rgb(221, 221, 221) !important;
- }
- .photo{
- width: 200px;
- }
- </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="" style="color: #000;">任务报表</a>
- </sapn>
- </div>
- </div>
- <div class="th-box">
- <div class="th-bar">
- <div class="seach-box">
- <ul class="clearfix">
- <li>
- <select class="form-control selectpicker" id="taskList" data-live-search="true"></select>
- </li>
- <!--<li>
- <select class="form-control selectpicker" id="questionList" data-live-search="true"></select>
- </li>
- <li>
- <select class="form-control selectpicker" id="result" data-live-search="true">
- <option value="null">请选择结果</option>
- <option value="">无评价</option>
- <option value="十分满意">十分满意</option>
- <option value="满意">满意</option>
- <option value="不满意">不满意</option>
- </select>
- </li>-->
- <li style="margin-top: 4px;">
- <input type="text" id="phone" class="form-control size-14" placeholder="请输入电话" />
- </li>
- <li style="margin-top: 4px;">
- <input type="text" id="salesOffice" class="form-control size-14" placeholder="请输入营业部" />
- </li>
- <li style="margin-top: 4px;">
- <input type="text" id="mubiao" class="form-control size-14" placeholder="请输入用户分类" />
- </li>
- <li>
- <select class="form-control selectpicker" id="callstate" data-live-search="true">
- <option value="">请输入通话结果</option>
- <option value="1">已接通</option>
- <option value="0">未接通</option>
- </select>
- <!--<input type="text" id="callstate" class="form-control size-14" placeholder="请输入通话结果" />-->
- </li>
- <li>
- <input type="text" id="stime" class="photo size-14 laydate-icon" placeholder="请选择开始时间和结束时间" />
- </li>
-
- <li>
- <a class="sc_btn seach">搜索</a>
- </li>
- <li>
- <a class="sc_btn export">导出</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-field="" data-formatter="setCode" data-align="center">编号</th>
- <th data-field="FilePath" data-formatter="setVice" data-align="center">录音</th>
- <th data-field="salesOffice" data-align="center">营业部</th>
- <th data-field="phone" data-align="center">电话</th>
- <th data-field="orderNature" data-align="center">用户分类</th>
- <th data-field="question1" data-align="center">问题1</th>
- <th data-field="result1" data-formatter="setNull" data-align="center">结果1</th>
- <th data-field="question2" data-align="center">问题2</th>
- <th data-field="result2" data-formatter="setNull" data-align="center">结果2</th>
- <th data-field="question3" data-align="center">问题3</th>
- <th data-field="result3" data-formatter="setNull" data-align="center">结果3</th>
- <th data-field="connect" data-align="center">是否接通</th>
- <th data-field="calltime" data-align="center">呼叫时间</th>
- <th data-field="totalTime" data-align="center">通话时长</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/laydate/laydate.js"></script>
- <script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
- <script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
- <script>
- var table = $('#table1');
- var token = $.cookie("token");
- var pageSize = 10;
- var pasgeNumeber = 1
- $(document).ready(function() {
- getProLocations($('#taskList'));
- laydate.render({
- elem: '#stime',
- range: '~',
- calendar: true,
- theme: '#1ab394',
- });
- initTable()
- $(".seach").click(function() {
- // if(!$.trim($('#questionList').val())) {
- // layer.msg('请选择问题');
- // return;
- // }
- initTable()
- })
- //导出功能
- $('.export').click(function() {
- dcexcels(this);
- // if(!$.trim($('#questionList').val())) {
- // layer.msg('请选择任务');
- // return;
- // }
- // dcexcels(this);
- })
- });
- //获取表头 和 数据
- function initTable() {
- table.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- table.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "AutomaticCall/GetListExpt", //获取数据的Servlet地址
- contentType: 'application/x-www-form-urlencoded',
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 15, 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) { //设置查询参数
- pageSize = params.pageSize
- pageNumber = params.pageNumber
- var param = {
- pageindex: params.pageNumber, //int 否 条数,默认为10
- pagesize: params.pageSize, //int 否 页码,默认为1
- phone: $("#phone").val(), //任务id(必选)
- callstate: $("#callstate").val(), //问题id(必选)
- salesOffice: $('#salesOffice').val(),
- orderNature:$('#mubiao').val(),
- taskid:$("#taskList").val(),
- sdate: $("#stime").val() && $("#stime").val().split(' ~ ')[0],
- edate: $("#stime").val() && $("#stime").val().split(' ~ ')[1],
- isexport: 0,
- token: token,
- };
- return param;
- },
- responseHandler: function(res) {
- return {
- "total": res.total, //总页数
- "rows": res.rows//数据
- };
- },
- onLoadSuccess: function() { //加载成功时执行
- //layer.msg("加载成功");
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //编号
- function setCode(val, row, index) {
- //return index + 1;
- var page = table.bootstrapTable("getPageCode");
- return index + 1;
- }
- //音频
- function setVice(val, row) {
- if(val) {
- return '<div class="imgs">' +
- '<img src="../img/vice.png" alt="" onclick= ck(this,"' + row.CallId + '") item="' + val + '" />' +
- '</div>';
- } else {
- return '-';
- }
- }
- function ck(val, callId) {
- var path = $(val).attr("item");
- $(".t-shade").addClass("cx");
- $(".Ly_box").empty();
- $(".LY_box").empty();
- $('<audio style="width:100%;"class=" " type="audio/v3" src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
- }
- $(".setwin").click(function() {
- $(".t-shade").removeClass("cx");
- $('audio')[0].pause();
- });
- function dcexcels(obj) {
- console.log(pageSize, pageNumber)
- // debugger
- var url = huayi.config.callcenter_url + "AutomaticCall/GetListExpt?token=" + $.cookie("token");
- url += "&pagesize=" + pageSize;
- url += "&pageindex=" + pageNumber;
- url += "&isexport=" + 1;
- url += "&phone=" + $("#phone").val();
- url += "&callstate=" + $("#callstate").val();
- url += "&salesOffice=" + $("#salesOffice").val();
- url += "&orderNature=" + $("#mubiao").val();
- url += "&taskid=" + $("#taskList").val();
- url += "&sdate=" + ($("#stime ").val() && $("#stime").val().split(' ~ ')[0]); // string 否 开始时间
- url += "&edate=" + ($("#stime").val() && $("#stime").val().split(' ~ ')[1]); // string 否 开始时间
- console.log(url)
- obj.href = url;
- }
-
- function setNull(v){
- if(v==''){
- return null
- }else{
- return v
- }
-
- }
- //任务列表 问题列表 问题选项 三级联动
- function getProLocations(obj) {
- obj.empty();
- // obj1.empty();
- obj.append('<option selected="selected" value="0">请选择任务名</option>');
- // obj1.append('<option selected="selected" value="0">请选择问题</option>');
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "AutomaticCall/GetExportTaskList",
- dataType: 'json',
- data: {
- token: $.cookie('token')
- },
- success: function(data) {
- var content = data.data; //任务列表
- //初始化 任务列表
- if(content && content.length > 0) {
- $(content).each(function(i, n) {
- $("<option value='" + n.taskId + "'>" + n.taskName + "</option>").appendTo(obj);
- });
- obj.selectpicker('refresh');
- }
- },
- });
- }
- </script>
- </body>
- </html>
|