| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- var openid = helper.cookies.get("openid");
- var DayType = "today"
- Ajax();
- //获取数据
- $(".order_deta dl dt").click(function() {
- // var num =$(this).index();
- // $(".itemdiv").empty();
- // $(".itemdiv").eq(num).fadeIn();
- DayType = $(this).attr('index');
- var num=$(this).index();
- var TitText=$(this).parent("dl").parent(".order_deta").siblings(".tit");
- var ThisText=$(this).text();
- TitText.text(ThisText+"已完成工单");
- Ajax();
- })
- $(".buttons a ").click(function() {
- $(".img_c").show();
- $(".img_h").hide();
- $(this).children(".img_c").hide();
- $(this).children(".img_h").show();
-
- })
- //$('.type_down').on('tap', function() {
- // window.location.href = "list.html";
- //
- //});
- $('.return').on('tap', function() {
- window.location.href = "../client-side/client_index.html";
- });
- function Ajax() {
- $.ajax({
- url: huayi.config.callcenter_url + '/WxReport/GetWordOrderFinishReport',
- data: {
- openid: openid, //微信openid,
- daytype: DayType
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var finsh = data.data[0]
- $(".order_num").text(finsh.合计); //合计
- $(".complaint").text(finsh.投诉); //投诉
- $(".consulting").text(finsh.咨询); //咨询
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //区域的数据
- var DayType2 = 'today'
- AreaLs();
- //周报
- // 使用刚指定的配置项和数据显示图表。
- $(".area_deta dl dt").click(function() {
- // var num =$(this).index();
- // $(".itemdiv").empty();
- // $(".itemdiv").eq(num).fadeIn();
- DayType2 = $(this).attr('index');
- var TitText=$(this).parent("dl").parent(".area_deta").siblings(".tit");
- var ThisText=$(this).text();
- TitText.text(ThisText+"各区域统计");
- AreaLs();
- })
- function AreaLs() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + '/WxReport/GetWordOrderAreaReport',
- dataType: 'json',
- data: {
- openid: openid, //微信openid,
- daytype: DayType2
- },
- success: function(data) {
- if(data.state == "success") {
- //alert(JSON.stringify(data.data[0]))
- var result = data.data[0];
- //图标二
- var myChart2 = echarts.init(document.getElementById('main2'));
- // 指定图表的配置项和数据
- option2 = {
- color:['#e3b2f7','#ffc2c2','#aab0fb','#87e1e8','#6dffc3','#00f4e0','#2ad5ee','#599fed','#ffc2c2','#ffc2c2'],
- title: {
- // text: '某站点用户访问来源',
- // subtext: '纯属虚构',
- x: 'center'
- },
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- legend: {
- orient: 'vertical',
- left: 'left',
- data: []
- // '空港城市公司', '山西区域中心', '第三区域中心', '第二区域中心', '第一区域中心', '第六区域中心', '新密城市公司', '第五区域中心', '第二区域中心', '第四区域中心'
- },
- series: [{
- name: '访问来源',
- type: 'pie',
- radius: '50%',
- center: ['50%', '60%'],
- data: [{
- value: result.空港城市公司,
- name: '空港城市'
- },
- {
- value: result.山西区域中心,
- name: '山西区域'
- },
- {
- value: result.第三区域中心,
- name: '第三区域'
- },
- {
- value: result.第二区域中心,
- name: '第二区域'
- },
- {
- value: result.第一区域中心,
- name: '第一区域'
- }, {
- value: result.第六区域中心,
- name: '第六区域'
- },
- {
- value: result.新密城市公司,
- name: '新密城市'
- },
- {
- value: result.第五区域中心,
- name: '第五区域'
- },
- {
- value: result.第二区域中心,
- name: '第二区域'
- },
- {
- value: result.第四区域中心,
- name: '第四区域'
- }
- ],
- itemStyle: {
- emphasis: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }]
- };
- myChart2.setOption(option2);
- }
- },
- error: function(data) {
- console.log(data.message);
- }
- });
- }
- //工单类型
- var DayType3 = 'today'
- Worktype();
- //获取数据
- $(".report_type dl dt").click(function() {
- // var num =$(this).index();
- // $(".itemdiv").empty();
- // $(".itemdiv").eq(num).fadeIn();
- DayType3 = $(this).attr('index');
- var TitText=$(this).parent("dl").parent(".type_deta").siblings(".tit");
- var ThisText=$(this).text();
- TitText.text(ThisText+"各类型工单");
- Worktype();
- })
- function Worktype() {
- $.ajax({
- url: huayi.config.callcenter_url + '/WxReport/GetWordOrderTypeReport',
- data: {
- openid: openid, //微信openid,
- daytype: DayType3
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var finsh = data.data
- cq_rates:"0.00%"
- cqs:33
- dcl_rates:"7.69%"
- dcls:6
- djd_rates:"15.38%"
- djds:12
- dpd_rates:"20.51%"
- dpds:16
- ycl_rates:"14.10%"
- ycls:11
- $(".send_perc").text(finsh.dpd_rates); //待派单占比
- $(".send_num").text(finsh.dpds); //待派单数量
- $(".send_lengh").css("width",finsh.dpd_rates);
-
- $(".receiving_perc").text(finsh.djd_rates); //待接单占比
- $(".receiving_num").text(finsh.djds); //待接单占比
- $(".receiving_lengh").css("width",finsh.djd_rates);
-
- $(".unfinsh_perc").text(finsh.dcl_rates); //待完成占比
- $(".unfinsh_num").text(finsh.dcls); //待完成数量
- $(".unfinsh_lengh").css("width",finsh.dcl_rates);
-
- $(".finsh_perc").text(finsh.ycl_rates); //已完成占比
- $(".finsh_num").text(finsh.ycls); //已完成数量
- $(".finsh_lengh").css("width",finsh.ycl_rates);
-
- $(".overtime_perc").text(finsh.cq_rates); //超期工单占比
- $(".overtime_num").text(finsh.cqs); //超期工单数量
- $(".overtime_lengh").css("width",finsh.cq_rates);
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
|