| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- mui.init({})
- var state=1;
- var openid = helper.cookies.get("openid");
- var roleCode = helper.cookies.get("RoleCode");
- var Itype = helper.request.queryString("Itype");
- var turn = helper.request.queryString("turn");
- var turn=1;
- //var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
- $(function () {
- if (turn) {
- $(".mui-nav").show();
- $(".cont-margin").css("margin-top","44px");
- $("#OA_task").css("margin-top","88px");
- }else{
- $("#OA_task").css("margin-top","0px");
- $(".cont-margin").css("margin-top","44px");
- }
- if (Itype=="1") {
- $(".titdyna li").removeClass("tab_color");
- $(".titdyna li:eq(0)").addClass("tab_color");
- state=1
- Ajax();
- }else if(Itype=="2"){
- $(".titdyna li").removeClass("tab_color");
- $(".titdyna li:eq(1)").addClass("tab_color");
- state=2
- Ajax();
- }else if(Itype=="3"){
- state=3
- $(".titdyna li").removeClass("tab_color");
- $(".titdyna li:eq(2)").addClass("tab_color");
- Ajax();
- }else if(Itype=="4"){
- state=4
- $(".titdyna li").removeClass("tab_color");
- $(".titdyna li:eq(3)").addClass("tab_color");
- Ajax();
- }else
- Ajax();
- })
- $(".titdyna ul li").click(function () {
- $(".titdyna li").removeClass("tab_color");
- $(this).addClass("tab_color");
- state=$(this).attr('data-index');
- $.ajax({
- url: huayi.config.callcenter_url + 'WxLogin/GetWoList',
- data: {
- openid: openid, //微信openid,
- states:state,
- //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- $("#OA_task").empty();
- if(data.rows && data.rows.length > 0) {
- $(".noinfor").text("");
- $(data.rows).each(function(i, n) {
- var stateText
- if (n.State==0) {
- stateText="待指派"
- }else if (n.State==1) {
- stateText="待接单"
- }else if(n.State==2){
- stateText="待处理"
- }else if(n.State==3){
- stateText="退回待处理"
- }else if(n.State==4){
- stateText="异常退回待处理"
- }else if(n.State==5){
- stateText="处理中"
-
- }else if(n.State==10){
- stateText="已完成"
- }
-
- if (n.TypeClassName=="") {
- titleText=n.GDLXName;
- }else{
- titleText=n.TypeClassName;
- }
- $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
- '<div class="mui-table">' +
- '<div class="mui-table-cell mui-col-xs-8">' +
- '<h4 class="mui-ellipsis">' + titleText +
- '</h4><h5>' + n.CreateTime +
- '</h5></div>'+
- '<div class="mui-table-cell mui-col-xs-4 mui-text-right">'+
- '<span class="mui-h5">'+stateText+
- '</span></div></div></li>').appendTo('#OA_task');
- });
- //工单跳转
- $('.order').on('tap', function() {
-
- var index = $(this).attr('data-index');
- window.location.href = "orderDetail.html?id=" + index+'&type='+state;
- });
- } else {
- $(".noinfor").text("暂无信息");
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- })
- function Ajax() {
- //$(".order").remove();
- $.ajax({
- url: huayi.config.callcenter_url + 'WxLogin/GetWoList',
- data: {
- openid: openid, //微信openid,
- states:state
- //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
- },
- async: true,
- dataType: 'json',
- type: 'get', //HTTP请求类型
- success: function(data) {
- if(data.rows && data.rows.length > 0) {
- $(".noinfor").text("");
- $("#OA_task").empty();
- $(data.rows).each(function(i, n) {
- var stateText;
- var titleText;
-
- if (n.State==0) {
- stateText="待指派"
- }else if (n.State==1) {
- stateText="待接单"
- }else if(n.State==2){
- stateText="待处理"
- }else if(n.State==3){
- stateText="退回待处理"
- }else if(n.State==4){
- stateText="处理中"
- }else if(n.State==5){
- stateText="已完成"
- }
- if (n.TypeClassName=="") {
- titleText=n.GDLXName;
- }else{
-
- titleText=n.TypeClassName;
- }
- $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
- '<div class="mui-table">' +
- '<div class="mui-table-cell mui-col-xs-10">' +
- '<h4 class="mui-ellipsis">' + titleText +
- '</h4><h5>' + n.CreateTime +
- '</h5></div>'+
- '<div class="mui-table-cell mui-col-xs-2 mui-text-right">'+
- '<span class="mui-h5">'+stateText+
- '</span></div></div></li>').appendTo('#OA_task');
- });
- //工单跳转
- $('.order').on('tap', function() {
- var index = $(this).attr('data-index');
- window.location.href = "orderDetail.html?id=" + index+'&type='+state;
- });
- } else {
- $(".noinfor").text("暂无信息");
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
|