| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <!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" />
- <style>
- .LY:hover {
- color: #fff;
- }
-
- .LY:active {
- color: #fff!important;
- }
-
- .table {
- margin-bottom: 0;
- }
-
- .table-body {
- width: 100%;
- /*height: 300px;
- overflow-y: scroll;*/
- overflow-x: scroll;
- }
-
- .tds {
- background-color: #1ab394!important;
- color: #fff;
- padding: ;
- }
-
- .hwbb tbody td {
- min-width: 100px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .hwbb td {
- text-align: center;
- }
- </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="javaScript:;">外呼报表</a>>
- <a href="" style="color: #000;">外呼问题查询报表</a>
- </sapn>
- </div>
- </div>
- <div class="th-box clearfix">
- <div class="th-bar">
- <div class="seach-box fr">
- <ul>
- <li>任务列表:
- <select name="" id="cljg" class="x-color select"></select>
- </li>
- <li>问题列表:
- <select name="" id="Wt" class="x-color select"></select>
- </li>
- <li>乡镇或单位:
- <select name="" id="country" class="x-color select">
- <option value="">--全部--</option>
- </select>
- </li>
- <li>
- 时间:
- <input type="text" id="ss_kssj" 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;">
- <div class="table-body">
- <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
- <thead>
- <tr>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <script src="../js/laydate/laydate.js"></script>
- <script>
- $(document).ready(function() {
- taskSelect(); //查询条件中获取任务列表
- questionnaireSelect(); //查询条件问题任务列表
- getCountry();
- laydate.render({
- elem: '#ss_kssj',
- range: '~',
- //value: st,
- calendar: true,
- theme: '#1ab394',
- });
- $(".sc_btn").click(function() {
- getColumnList()
- .then(function() {
- getDataList();
- });
- })
- //导出功能
- $('.export').click(function() {
- dcexcel(this);
- })
- });
- //获取表头
- function getColumnList() {
- var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutReport/GetColumnList",
- dataType: 'json',
- data: {
- taskID: $("#cljg").val(), //string 是 任务id
- quesid: $("#Wt").val(), //string 是 问题id
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- $(".hwbb thead tr").empty();
- if(data.state.toLowerCase() == "success") {
- var Count = data.data;
- if(Count.length > 0) {
- $('<td class="tds"> </td>').appendTo(".hwbb thead tr");
- for(var i = 0; i < Count.length; i++) {
- $('<td class="tds" colspan="' + Count[i].fenxiangshu + '">' + Count[i].wenti + ' </td>').appendTo(".hwbb thead tr");
- }
- dtd.resolve(); // 改变Deferred对象的执行状态
- }
- }
- }
- });
- return dtd.promise(); // 返回promise对象
- }
- function getDataList() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutReport/GetDataList",
- dataType: 'json',
- data: {
- TaskID: $("#cljg").val(), //string 是 任务id
- quesid: $('#Wt').val(), // string 是 问题id
- countryid: $('#country').val(), // string 否 乡镇或单位id
- sdate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0],// string 否 开始时间
- edate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1],//string 否 结束时间
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- $(".hwbb tbody ").empty();
- if(data.state.toLowerCase() == "success") {
- var dataList = data.data;
- for(var i = 0, dataListLength = dataList.length; i < dataListLength; i++){
- var $tr = $('<tr></tr>');
- var dataTd = dataList[i];
- for(var j = 0, dataTdLength = dataTd.length; j < dataTdLength; j++){
- $('<td class="td">' + dataTd[j] + ' </td>').appendTo($tr);
- }
- $tr.appendTo(".hwbb tbody");
- }
- }
- }
- });
- }
- //导出
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "Questionnaire/GetDataListExpt?token=" + $.cookie("token");
- url += "&taskname=" + $("#cljg").val() + "&question=" + $("#Wt").val();
- obj.href = url;
- }
- //查询条件中获取任务列表
- function taskSelect() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
- dataType: 'json',
- data: {
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var Count = data.data;
- if(Count.length > 0) {
- $("<option value=''>--全部--</option>").appendTo($("#cljg"));
- for(var i = 0; i < Count.length; i++) {
- $("<option value='" + Count[i].F_TaskID + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
- }
- } else {
- $("<option value=''>--暂无数据--</option>").appendTo($("#cljg"));
- }
- }
- }
- });
- }
- ///查询条件问题任务列表
- function questionnaireSelect() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Questionnaire/GetQList",
- dataType: 'json',
- data: {
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var Count = data.data;
- //$("<option value=''>--全部--</option>").appendTo($("#Wt"));
- for(var i = 0; i < Count.length; i++) {
- $("<option value='" + Count[i].F_CategoryId + "'>" + Count[i].F_Title + "</option>").appendTo($("#Wt"));
- }
- } else {
- $("<option value=''>--暂无数据--</option>").appendTo($("#Wt"));
- }
- }
- });
- }
- //获取乡镇或单位下拉
- function getCountry() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
- dataType: 'json',
- data: {
- flag: 'JBDW',
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var res = data.data;
- for(var i = 0; i < res.length; i++) {
- $('<option value="' + res[i].F_DictionaryValueId + '">' + res[i].F_Name + '</option>').appendTo($("#country"));
- }
- } else {
- $("<option value=''>--暂无数据--</option>").appendTo($("#country"));
- }
- }
- });
- }
- </script>
- </body>
- </html>
|