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(); $('').appendTo($(".quesType")); $(goodslist).each(function(i, n) { $('').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 = '
' + '

'+ ''+"工单编号" + ''+ ''+j.F_WorkOrderCode + ''+ ''+j.F_State + ''+ '

' + '

'+ ''+"超期时间" + ''+ ''+j.overtime + ''+ '

' + '

'+ ''+"问题描述" + ''+ ''+j.F_Description + ''+ '

' + '

'+ ''+"责任科室" + ''+ ''+j.F_Responsibility + ''+ ''+"销售基地" + ''+ ''+j.F_SalesBase + ''+ '

' + '
' $('.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 = '
' + '

'+ ''+"工单编号" + ''+ ''+j.F_WorkOrderCode + ''+ ''+j.F_State + ''+ '

' + '

'+ ''+"超期时间" + ''+ ''+j.overtime + ''+ '

' + '

'+ ''+"问题描述" + ''+ ''+j.F_Description + ''+ '

' + '

'+ ''+"责任科室" + ''+ ''+j.F_Responsibility + ''+ ''+"销售基地" + ''+ ''+j.F_SalesBase + ''+ '

' + '
' $('.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='' + n.Overdue + ''; tableTitsx= '超期未完' }else if ($('#customer_exceed').val()==2) { tableSx='' + n.EndOverdue + ''; tableTitsx='已回访' } if (j!=0) { var rate = ''; if (n.rate) { rate = n.rate;} var str = '' + n.name + '' + n.number + '' + n.ongesttime + '' + n.minimumtime + '' + n.averageTime + '' + n.median + '' +tableSx+'' + n.efficiency + '' $('.scroll_table tbody').append(str); }else{ var rate = ''; if (n.rate) { rate = n.rate;} var str1 = +'' +'名称' +'总数' +'用时最长' +'用时最短' +'平均用时' +'中位数' +tableTitsx+'效率提升率' $('.titTable').append(str1); var str1 = '' +'' + n.name + '' + n.number + '' + n.ongesttime + '' + n.minimumtime + '' + n.averageTime + '' + n.median + '' +tableSx+'' + n.efficiency + '' $('.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 }); } } }); }