| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587 |
- var start;
- var end;
- $(function() {
- var mySwiper = new Swiper('.swiper-container', {
- pagination: { /* 分页器*/
- el: '.swiper-pagination',
- clickable: true,
- },
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- on: {
- init: function() {
- swiperAnimateCache(this); //隐藏动画元素
- swiperAnimate(this); //初始化完成开始动画
- },
- transitionEnd: function() {
- swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
- },
- }
- })
- laydate.render({
- elem: '#time3',
- range: '~',
- format: 'yyyy-MM-dd',
- theme: '#114a97',
- done: function(value) {
- //threeScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaTwo").val())
- oneSel(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
- }
- });
- laydate.render({
- elem: '#time2',
- range: '~',
- format: 'yyyy-MM-dd',
- theme: '#114a97',
- done: function(value, date) {
- //获取数据
- $(".pieClass").hide();
- $(".table").hide();
- $(".scroll_table").hide();
- getPiedatas(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1]);
- initPies();
- keyWordDetail(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
- }
- });
- laydate.render({
- elem: '#time1',
- range: '~',
- format: 'yyyy-MM-dd',
- theme: '#114a97',
- done: function(value, date) {
- partpaat(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
- // oneSel(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
- }
- });
- setTimeout('swiper()', 2000);
- })
- var myDate=new Date();
- function turn(aa){
- if(aa<10){
- aa = "0" + aa;
- }
- return aa
- }
- $('#time1').val(myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-01"+" ~ "+myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-"+turn(myDate.getDate()));
- $('#time2').val(myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-01"+" ~ "+myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-"+turn(myDate.getDate()));
- $('#time3').val(myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-01"+" ~ "+myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-"+turn(myDate.getDate()));
- function swiper() {
- $("swiper-pagination .swiper-pagination-bullet").css({
- "width": 48 * getHeightScale + "px",
- "height": 48 * getHeightScale + "px"
- });
- $("swiper-pagination .swiper-pagination-bullet-active").css({
- "width": 73 * getHeightScale + "px",
- "height": 73 * getHeightScale + "px"
- });
- }
- //第一屏
- // 第一屏 发光外框 定时
- (function() {
- var i = 0;
- var length = $(".orderState_ul >li").length;
- var j = 0;
- var length_1 = $(".orderTtype_Con li").length;
- setInterval(function() {
- if(i == length) {
- i = 0;
- $(".orderState_ul >li").removeClass('active');
- }
- $(".orderState_ul >li").eq(i).addClass('active').siblings().removeClass('active');
- if(i == 5) {
- $(".orderState_ul >li").eq(4).removeClass('active');
- }
- i++;
- if(j == length_1) {
- j = 0;
- }
- $(".orderTtype_Con li").eq(j).addClass('active').siblings().removeClass('active');
- j++;
- }, 2000);
-
- })();
- oneSel($('#time3').val().split(' ~ ')[0],$('#time3').val().split(' ~ ')[1]);
- function oneSel(sd, ed) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WOReport/GetFeedbacklList',
- async: true,
- dataType: 'json',
- data: {
- stime: sd,
- endtime: ed
- },
- success: function(data) {
- if(data.state == "success") {
- var sorceData = data.rows;
- // 咨询
- $(".order_widt").html(sorceData[0].daynumber);
- $(".order_catiy").html(sorceData[0].mounthnumber);
- $(".order_catypa").html(sorceData[0].Totalnumber);
- $(".persent_lex").html(sorceData[0].Proportion);
- // 投诉
- $(".caluy1").html(sorceData[1].daynumber);
- $(".caluy2").html(sorceData[1].mounthnumber);
- $(".caluy3").html(sorceData[1].Totalnumber);
- $(".caluy4").html(sorceData[1].Proportion);
- // 抽检
- $(".cico1").html(sorceData[2].daynumber);
- $(".cico2").html(sorceData[2].mounthnumber);
- $(".cico3").html(sorceData[2].Totalnumber);
- $(".cico4").html(sorceData[2].Proportion);
- // 建议 pity4
- $(".outit1").html(sorceData[3].daynumber);
- $(".outit2").html(sorceData[3].mounthnumber);
- $(".outit3").html(sorceData[3].Totalnumber);
- $(".outit4").html(sorceData[3].Proportion);
- // 总计 pity4
- $(".pity1").html(sorceData[4].daynumber);
- $(".pity2").html(sorceData[4].mounthnumber);
- $(".pity3").html(sorceData[4].Totalnumber);
- $(".pity4").html(sorceData[4].Proportion);
- }
- }
- })
- }
- //第二屏
- banner1()
- function banner1() {
- var i = 0;
- var Timer;
- $(function() {
- $(".picImg").eq(0).show().siblings().hide(); //默认第一个div片显示,其他的隐藏
- //自动轮播
- TimerBanner();
- //点击红圈
- $(".picImg").hover(function() { //鼠标移动上去
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i = $(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
- }, function() { //鼠标离开
- //TimerBanner(); //继续轮播 计时器开始
- });
- $(".tabs .aaa").hover(function() { //鼠标移动上去
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i = $(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
- }, function() { //鼠标离开
- //TimerBanner(); //继续轮播 计时器开始
- });
- $(".tabItems li").click(function () {
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i = $(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
-
-
- })
- });
- //轮播部分
- function TimerBanner() {
- Timer = setInterval(function() {
- i++;
- if(i == 6) {
- i = 0;
- }
- showPic()
- }, 5000);
- }
- //显示div
- function showPic() {
- $(".picImg").eq(i).show().siblings().hide();
- $(".bg").hide();
- $(".tabs .aaa").eq(i).children(".bg").show();
- $(".tabItems li").eq(i).addClass("active").siblings().removeClass("active");
- $(".content>div").eq(i).show().siblings().hide();
- }
- }
- //第三屏
- keyWordDetail();
- quesTypeSel();
- var Yname;
- $(".scroll_table tbody").on("click","tr",function(){
- $(".scroll_table tbody tr").removeClass("backg_cor");
- $(this).addClass("backg_cor");
- $(this).children("td").eq(0).addClass("bacg");
- Yname =$(this).children("td").eq(0).attr("index");
- $('.tagcloud').html('');
- textCon();
- });
- $(".tagcloud").on("click","div",function(){
- $(".tagcloud div").addClass("tagcloud_bj");
- $(".tagcloud div").removeClass("tagcloud_bjShine");
- $(this).removeClass("tagcloud_bj");
- $(this).addClass("tagcloud_bjShine");
- });
- quesTypeSel();
-
- $("#Product_Category").change(function() {
- partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- $("#customer_taxPointDes").change(function() {
- partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- $("#customer_exceed").change(function() {
- //获取数据
- $(".pieClass").hide();
- $(".table").hide();
- $(".scroll_table").hide();
- getPiedatas($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
- initPies();
- keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
-
- })
- $("#styqu").change(function() {
- partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- $("#customer_legalName").change(function() {
- partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- $("#customer_comaddress").change(function() {
- partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- $("#xiaoshou").change(function() {
- partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- $("#time3").change(function() {
- oneSel(sd,ed);
- })
- $(".quesType").change(function() {
- $(".pieClass").hide();
- $(".table").hide();
- $(".scroll_table").hide();
- getPiedatas($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
- initPies();
- keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
-
- })
- $("#product_name").change(function() {
- $(".pieClass").hide();
- $(".table").hide();
- $(".scroll_table").hide();
- getPiedatas($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
- initPies();
- keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
-
- })
- $("#category").change(function() {
- $(".pieClass").hide();
- $(".table").hide();
- $(".scroll_table").hide();
- getPiedatas($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
- initPies();
- keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
-
- })
- //部门下拉框
- function quesTypeSel() {
- $.getJSON( huayi.config.callcenter_url +"WorkOrder/GetQuestionName",
- {
- branchcode: $(".areaFive").val()
- },
- function(result) {
- if(result.state.toLowerCase() == "success") {
- goodslist = result.data;
- $(".depart").empty();
- $('<option value="">问题类别</option>').appendTo($(".quesType"));
- $(goodslist).each(function(i, n) {
- $('<option value="' + n.F_Id
- + '">' + n.F_QuestionName
- + '</option>').appendTo($(".quesType"));
- })
- }
- });
- }
- function textCon() {
- debugger
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "WOReport/GetComplainthandlList",
- async: true,
- dataType: 'json',
- data: {
- stime: $('#time2').val() && $('#time2').val().split(' ~ ')[0],
- endtime: $('#time2').val() && $('#time2').val().split(' ~ ')[1],
- questionName:Yname,
- isEnd:$('#customer_exceed').val(),
- product:$("#product_name").val(),//产品
- salesBase:$("#category").val()//基地
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
-
- var con = data.rows;
- var arr;
- $.each(con, function(index, ele) {
- debugger
- arr = con[index].worker; //console.log(allData);
- console.log(JSON.stringify(arr))
- console.log(arr.overtime)
- });
- if (con[0].worker) {
- $(con[0].worker).each(function(k, j) {
- var strs = '<div index="" class="tagcloud_bj">' +
- '<p class="tag_title" style="margin-top:7px">'+
- '<span class="danhao">'+"工单编号" + '</span>'+
- '<span class="">'+j.F_WorkOrderCode + '</span>'+
- '<span class="Yichin">'+j.F_State + '</span>'+
- '</p>' +
- '<p class="tag_title">'+
- '<span class="danhao">'+"超期时间" + '</span>'+
- '<span class="">'+j.overtime + '</span>'+
- '</p>' +
- '<p class="tag_title tag_title1 tag_titleWt" style="width:100%;height:95px;">'+
- '<span class="danhao washpa" style="float: left;">'+"问题描述" + '</span>'+
- '<span class="Wentimo" style="text-align: justify !important;float: left;">'+j.F_Description + '</span>'+
- '</p>' +
- '<p class="tag_title aacdu" style="margin-top:50px">'+
- '<span class="danhao">'+"责任科室" + '</span>'+
- '<span class="">'+j.F_Responsibility + '</span>'+
- '<span class="danhao" style="margin-left:0px;">'+"销售基地" + '</span>'+
- '<span class="">'+j.F_SalesBase + '</span>'+
- '</p>' +
- '</div>'
- $('.tagcloud').append(strs);
- })
- $(".tag_title").css({
- "font-size": 16*getHeightScale+"px",
- "line-height": 23*getHeightScale+"px",
- "height": 23*getHeightScale+"px"
- });
- $(".tag_title").css({
- "height": "auto"
- });
- $(".aacdu").css({
- "font-size": 16*getHeightScale+"px",
- "line-height": 23*getHeightScale+"px",
- "height": 23*getHeightScale+"px",
- "margin": 10*getHeightScale+"px"
- });
- $(".tagcloud_bj").css({
- "margin": 10*getHeightScale+"px",
- "height": 267*getHeightScale+"px"
- });
- $(".tag_titleWt").css({
- "margin": 10*getHeightScale+"px",
- "width":"90%",
- "height": 117*getHeightScale+"px"
- });
- $(".Yichin").css({
- "position": "absolute",
- "right": 10*getHeightScale+"px",
- "top": 2*getHeightScale+"px"
- });
- }else{
- $('.tagcloud').html('');
- }
-
- }
- }
- });
- }
- function keyWordDetail(start,end) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "WOReport/GetComplainthandlList",
- async: true,
- dataType: 'json',
- data: {
- stime: start,
- endtime: end,
- questionName:$(".quesType").val(),
- isEnd:$('#customer_exceed').val(),
- product:$("#product_name").val(),//产品
- salesBase:$("#category").val(),//基地
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- $('.scroll_table tbody').html('');
- $('.titTable').html('');
- var con = data.rows;
- if(con.length==0){
- $('.tagcloud').html('');
- }else{
- $('.tagcloud').html('');
- $(con[0].worker).each(function (k, j) {
- var strs = '<div index="" class="tagcloud_bj">' +
- '<p class="tag_title" style="margin-top:7px">'+
- '<span class="danhao">'+"工单编号" + '</span>'+
- '<span class="">'+j.F_WorkOrderCode + '</span>'+
- '<span class="Yichin">'+j.F_State + '</span>'+
- '</p>' +
- '<p class="tag_title">'+
- '<span class="danhao">'+"超期时间" + '</span>'+
- '<span class="">'+j.overtime + '</span>'+
- '</p>' +
- '<p class="tag_title tag_titleWt">'+
- '<span class="danhao washpa" style="float: left;">'+"问题描述" + '</span>'+
- '<span class="Wentimo" style="text-align: justify !important;float: left;">'+j.F_Description + '</span>'+
- '</p>' +
- '<p class="tag_title aacdu">'+
- '<span class="danhao">'+"责任科室" + '</span>'+
- '<span class="">'+j.F_Responsibility + '</span>'+
- '<span class="danhao" style="margin-left:0px;">'+"销售基地" + '</span>'+
- '<span class="">'+j.F_SalesBase + '</span>'+
- '</p>' +
- '</div>'
- $('.tagcloud').append(strs);
-
- });
- $(".tag_title").css({
- "font-size": 16*getHeightScale+"px",
- "line-height": 23*getHeightScale+"px",
- "height": 23*getHeightScale+"px"
- });
- $(".aacdu").css({
- "font-size": 16*getHeightScale+"px",
- "line-height": 23*getHeightScale+"px",
- "height": 23*getHeightScale+"px",
- "margin": 10*getHeightScale+"px"
- });
- $(".tagcloud_bj").css({
- "margin": 10*getHeightScale+"px",
- "height": 267*getHeightScale+"px"
- });
- $(".tag_titleWt").css({
- "width":"90%",
- "margin": 10*getHeightScale+"px",
- "height": 117*getHeightScale+"px"
- });
- $(".Yichin").css({
- "position": "absolute",
- "right": 10*getHeightScale+"px",
- "top": 2*getHeightScale+"px"
- });
- }
-
- if (con.length>11) {
- debugger
- var tableSx;
- $(".pieClass").hide();
- $(".table").show();
- $(".scroll_table").show();
- $(con).each(function (j, n) {
- if ($('#customer_exceed').val()==1) {
- tableSx='<td class="tableW6 cqwwclist">'
- + n.Overdue + '</td>';
- tableTitsx= '<td class="tableW6">超期未完</td>'
- }else if ($('#customer_exceed').val()==2) {
- tableSx='<td class="tableW7 yhflist">'
- + n.EndOverdue + '</td>';
- tableTitsx='<td class="tableW7">已回访</td>'
- }
- if (j!=0) {
- var rate = '';
- if (n.rate) { rate = n.rate;}
- var str = '<tr><td class="tableW1" index="'+n.typeid+'">'
- + n.name + '</td><td class="tableW2">'
- + n.number + '</td><td class="tableW3">'
- + n.ongesttime + '</td><td class="tableW4">'
- + n.minimumtime + '</td><td class="tableW7">'
- + n.averageTime + '</td><td class="tableW7">'
- + n.median + '</td>'
- +tableSx+'<td class="tableW8">'
- + n.efficiency + '</td></tr>'
- $('.scroll_table tbody').append(str);
- }else{
- var rate = '';
- if (n.rate) { rate = n.rate;}
- var str1 = +'<thead class="thead">'
- +'<tr><td class="tableW1">名称</td>'
- +'<td class="tableW2">总数</td>'
- +'<td class="tableW3">用时最长</td>'
- +'<td class="tableW4">用时最短</td>'
- +'<td class="tableW7">平均用时</td>'
- +'<td class="tableW7">中位数</td>'
- +tableTitsx+'<td class="tableW8">效率提升率</td></tr></thead>'
- $('.titTable').append(str1);
- var str1 = '<tbody style="background: none;">'
- +'<tr><td class="tableW1" index="'+n.typeid+'">'
- + n.name + '</td><td class="tableW2">'
- + n.number + '</td><td class="tableW3">'
- + n.ongesttime + '</td><td class="tableW4">'
- + n.minimumtime + '</td><td class="tableW7">'
- + n.averageTime + '</td><td class="tableW7">'
- + n.median + '</td>'
- +tableSx+'<td class="tableW8">'
- + n.efficiency + '</td></tr></tbody>'
- $('.titTable').append(str1);
- }
-
- });
- }else{
- $(".pieClass").show();
- $(".table").hide();
- $(".scroll_table").hide();
- }
-
- $(".scroll_table").css({
-
- "width": "100%",
- "height": 422*getHeightScale+"px",
- "overflow": "hidden"
- });
- $(".table>tbody>tr>td").css({
- "padding": 8*getHeightScale+"px"
- });
- $(".tableW1").css({
- "font-size": 16*getHeightScale+"px",
- "width": 140*getHeightScale+"px",
- });
- $(".tableW2").css({
- "font-size": 16*getHeightScale+"px",
- "width": 60*getHeightScale+"px"
- });
- $(".tableW3").css({
- "font-size": 16*getHeightScale+"px",
- "width": 90*getHeightScale+"px",
- });
- $(".tableW4").css({
- "font-size": 16*getHeightScale+"px",
- "width": 90*getHeightScale+"px",
- });
- $(".tableW5").css({
- "font-size": 16*getHeightScale+"px",
- "width": 80*getHeightScale+"px",
- });
- $(".tableW6").css({
- "font-size": 16*getHeightScale+"px",
- "width": 110*getHeightScale+"px",
- });
- $(".tableW7").css({
- "font-size": 16*getHeightScale+"px",
- "width": 90*getHeightScale+"px",
- });
- $(".tableW8").css({
- "font-size": 16*getHeightScale+"px",
- "width": 110*getHeightScale+"px",
- });
- // $(".table_box_key table tbody tr td").css({
- // "font-size": 13*getHeightScale+"px"
- // });
- $(".scroll_table").Scroll({
- line: 1,
- speed: 500,
- timer: 2000
- });
- }
- }
- });
- }
|