| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- var openid = helper.cookies.get("openid");
- var UserType = helper.cookies.get("usertype");
- var UserCode = helper.cookies.get("usercode");
- var UserWord = helper.cookies.get("userword");
- //var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
- $(".add_icon").click(function() {
- //点击图片后发送跳转到指定页面的事件。
- window.location.href = "AddWorkolder.html";
- })
- workcount()
- function workcount() {
- $.getJSON(huayi.config.callcenter_url + 'WxLogin/GetWorkCount', {
- OpenId: openid
- }, function(result) {
- if(result.state == "success") {
- if (result.message=="成功") {
- //办理人员
- $(".DJD").text(result.DJD); //待接单
- $(".DCL").text(result.DCL); //待处理
- $(".YCL").text(result.YCL); //已处理
- //业务员
- if(UserType == 2 || UserType == 4) {
- $(".state").text("已创单");
- $(".YCD").show();
- $(".YFP").hide();
- $(".YCD").text(result.YCD); //已创单
- }
- $(".TD").text(result.TD); //已退单
- //分公司经理
- $(".DSP").text(result.DSP); //待办理
- $(".YBL").text(result.YBL); //已办理
- $(".YFP").text(result.YFP); //已分配
- $(".TD").text(result.TD); //已退单
- //高层
- $(".GCDBL").text(result.GCDBL); //待办理
- $(".YBL").text(result.YBL); //已办理
- } else if(result.message == "你的账号已在别处登录,你确定要再次登录吗?"){
- mui.alert('你的账号已在别处登录,你确定要再次登录吗?', '错误提示', function() {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + 'WxLogin/Login',
- async: true,
- dataType: 'json',
- data: {
- UserCode: UserCode,
- Password: UserWord,
- UserType: UserType,
- State: 1,
- openid: openid,
- //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
- },
- success: function(data) {
- if(data.state == "success") {
- var UserType = data.data.usertype;
- var UserCode = data.data.usercode;
- var UserName = data.data.UserName;
- var rolename = data.data.rolename;
- UserWord = UserWord;
- var UserCode = data.data.usercode;
- helper.cookies.set("usercode", UserCode, 7);
- helper.cookies.set("usertype", UserType, 7);
- helper.cookies.set("userword", UserWord, 7);
- helper.cookies.set("UserName", UserName, 7);
- helper.cookies.set("rolename", rolename, 7);
- if(UserType == "-1") { //系统管理员
- window.location.href = "../client-side/client_index.html";
- } else if(UserType == "0") { //接待部
- window.location.href = "../client-side/client_index.html";
- } else if(UserType == "1") { //办理人员
- window.location.href = "../client-side/client_index.html";
- } else if(UserType == "2") { //区域客服
- window.location.href = "../client-side/high_list.html";
- } else if(UserType == "3") { //监管
- window.location.href = "../client-side/Waiting_list.html";
- } else if(UserType == "4") { //监管
- window.location.href = "../client-side/Have_list.html";
- }
- } else {
- mui.alert(data.message);
- }
-
- }
- })
- });
- }
-
- }
- })
- }
|