@@ -2,7 +2,7 @@ var ROabc={index:0,splittime:5,ctabci:0,rock:function(){for(var _i in werock)thi
this . lda ( ) ; } , lda : function ( ) { this . resiezess ( ) ; $ ( window ) . resize ( RO . resiezess ) ; var agentjson = js . getoption ( 'agentjson' ) ; var hisjson = js . getoption ( 'historyjson' ) ; if ( agentjson == '' || hisjson == '' ) { this . reload ( ) ; } else { this . reload ( ) ; var str = js . getoption ( 'silderarr' ) ; if ( str ) this . showsilder ( js . decode ( str ) ) ; RO . showagent ( js . decode ( agentjson ) ) ; RO . showhistory ( js . decode ( hisjson ) ) ; }
this . initsearch ( ) ; $ ( '#nowc_div' ) . html ( js . getoption ( 'nowcompany' ) ) ; } , reload : function ( lx ) { if ( this . index == 2 ) { this . reus ( lx ) ; } else { this . ress ( lx ) ; } } , ress : function ( lx ) { this . homeress ( lx ) ; } , reus : function ( lx ) { js . ajax ( 'dept' , 'data' , false , function ( ret ) { RO . reuss ( ret ) ; } , lx , false , function ( ) { RO . showerror ( ) ; } ) ; } , ressw : function ( ret ) { this . loadtime = ret . loadtime ; js . setoption ( 'agentjson' , ret . agentjson ) ; js . setoption ( 'historyjson' , ret . historyjson ) ; var yyda = js . decode ( ret . agentjson ) ; this . showcompanyinfo ( ret . companyinfo ) ; this . showagent ( yyda ) ; this . showhistory ( js . decode ( ret . historyjson ) ) ; js . setoption ( 'myhomenum' , ret . myhomenum ) ; if ( ret . silderarr ) { var str = '' ; if ( ret . silderarr . length > 0 ) str = JSON . stringify ( ret . silderarr ) ; js . setoption ( 'silderarr' , str ) ; this . showsilder ( ret . silderarr ) ; }
this . shagent ( yyda ) ; this . reloadok ( ) ; if ( ret . editpass == 0 ) { js . wx . alert ( RO . bd6 ( '6K!35YWI5L!u5pS55a!G56CB5ZCO5Zyo5L2.55So' ) , function ( ) { RO . xgmm ( ) ; } ) ; } else { this . timeajaxs ( ) ; } } , shagent : function ( d ) { var stotal = 0 ; var myhomenum = js . getoption ( 'myhomenum' ) ; $ ( '#hylidiv' ) . hide ( ) ; $ ( '#hyli' ) . html ( '' ) ; if ( ! myhomenum ) return ; myhomenum = ',' + myhomenum + ',' ; var bo = false ; for ( var i = 0 ; i < d . length ; i ++ ) { stotal += parseFloat ( d [ i ] . stotal ) ; if ( myhomenum . indexOf ( ',' + d [ i ] . num + ',' ) > - 1 ) { this . showagents ( d [ i ] , 'hyli' , 'histotal_home_' ) ; bo = true ; } }
if ( bo ) $ ( '#hylidiv' ) . show ( ) ; this . changestotl ( false , 0 ) ; } , showmyinfo : function ( ) { js . ajaxbool = false ; js . ajax ( 'indexreim' , 'showmyinfo' , false , function ( ret ) { RO . sufo ( ret ) ; } , 'none' ) ; } , sufo : function ( ret ) { js . setoption ( 'deptallname' , ret . deptallname ) ; js . setoption ( 'ranking' , ret . ranking ) ; adminface = ret . face ; js . setoption ( 'adminface' , adminface ) ; js . setoption ( 'admintoken' , ret . admintoken ) ; adminame = ret . name ; js . setoption ( 'adminame' , adminame ) ; js . setoption ( 'adminid' , ret . id ) ; adminid = ret . id ; var sj = ret . mobile ; get ( 'myface' ) . src = adminface ; $ ( '#myname' ) . html ( adminame ) ; $ ( '#my_mz' ) . html ( adminame ) ; $ ( '#my_bm' ) . html ( ret . deptallname ) ; $ ( '#my_yh' ) . html ( ret . user ) ; $ ( '#my_sj' ) . html ( '' + sj . substr ( 0 , 3 ) + '****' + sj . substr ( - 4 ) + '' ) ; $ ( '#my_zw' ) . html ( ret . ranking ) ; this . showcompanyinfo ( ret . companyinfo ) ; if ( get ( 'bdwx' ) ) { if ( ret . bdwx ) { $ ( '#bdwx' ) . html ( '' + this . bd6 ( '5bey57uR5a6a' ) + '(<img src="' + ret . bdwx . headimgurl + '" whdth="16" height="16" align="absmiddle">' + ret . bdwx . nickname + ')' ) ; } else { $ ( '#bdwx' ) . html ( this . bd6 ( '5pyq57uR5a6aLOeCueWHu!e7keWumg::' ) ) ; } } } } ; var grouparr = [ ] , userarr = [ ] , agentarr = { } , RO = { } ; function initbody ( ) { for ( var i in ROabc ) js . main [ i ] = ROabc [ i ] ; js . main . zhuinit ( ) ; RO = js . main ; js . main . rock ( ) ; }
if ( bo ) $ ( '#hylidiv' ) . show ( ) ; this . changestotl ( false , 0 ) ; } , showmyinfo : function ( ) { js . ajaxbool = false ; js . ajax ( 'indexreim' , 'showmyinfo' , false , function ( ret ) { RO . sufo ( ret ) ; } , 'none' ) ; } , sufo : function ( ret ) { js . setoption ( 'deptallname' , ret . deptallname ) ; js . setoption ( 'ranking' , ret . ranking ) ; adminface = ret . face ; js . setoption ( 'adminface' , adminface ) ; js . setoption ( 'admintoken' , ret . admintoken ) ; adminame = ret . name ; js . setoption ( 'adminame' , adminame ) ; js . setoption ( 'adminid' , ret . id ) ; adminid = ret . id ; var sj = ret . mobile ; get ( 'myface' ) . src = adminface ; $ ( '#myname' ) . html ( adminame ) ; $ ( '#my_mz' ) . html ( adminame ) ; $ ( '#my_bm' ) . html ( ret . deptallname ) ; $ ( '#my_yh' ) . html ( ret . user ) ; $ ( '#my_sj' ) . html ( '' + sj . substr ( 0 , 3 ) + '****' + sj . substr ( - 4 ) + '' ) ; $ ( '#my_zw' ) . html ( ret . ranking ) ; this . showcompanyinfo ( ret . companyinfo ) ; if ( get ( 'bdwx' ) ) { if ( ret . bdwx ) { $ ( '#bdwx' ) . html ( '' + this . bd6 ( '5bey57uR5a6a' ) + '(<img src="' + ret . bdwx . headimgurl + '" whdth="16" height="16" align="absmiddle">' + ret . bdwx . nickname + ')' ) ; } else { $ ( '#bdwx' ) . html ( this . bd6 ( '5pyq57uR5a6aLOeCueWHu!e7keWumg::' ) ) ; } } } } ; var grouparr = [ ] , userarr = [ ] , agentarr = { } , RO = { } ; function initbody ( ) { new touchclass ( { } ) . reglongmenu ( ) ; for( var i in ROabc ) js . main [ i ] = ROabc [ i ] ; js . main . zhuinit ( ) ; RO = js . main ; js . main . rock ( ) ; }
var werock = { ctab : function ( lx ) { if ( ! get ( 'tabnav' + lx + '' ) ) return ; lx = parseFloat ( lx ) ; if ( lx < 0 ) lx = 3 ; if ( lx > 3 ) lx = 0 ; $ ( "[index='m']" ) . hide ( ) ; var sid = 'm_index' + lx + '' ; $ ( '#' + sid + '' ) . show ( ) ; $ ( '.weui_tabbar a' ) . removeClass ( 'weui_bar_item_on' ) ; $ ( '#tabnav' + lx + '' ) . addClass ( 'weui_bar_item_on' ) ; var tass = [ document . title , this . bd6 ( '5bqU55So' ) , this . bd6 ( '6IGU57O75Lq6' ) , adminame ] ; $ ( '.r-header-text' ) . html ( tass [ lx ] ) ; var tabs = [ 'chat' , 'ying' , 'user' , 'my' ] ; if ( get ( 'rtb' + this . index + '' ) ) get ( 'rtb' + this . index + '' ) . src = 'images/nav_' + tabs [ this . index ] + '0.png' ; if ( get ( 'rtb' + lx + '' ) ) get ( 'rtb' + lx + '' ) . src = 'images/nav_' + tabs [ lx ] + '1.png' ; this . index = lx ; try { sessionStorage . setItem ( 'nowtabs' , lx ) ; } catch ( e ) { }
this . touchobj . hidescrolls ( ) ; if ( lx == 2 ) { this . showuserlist ( ) ; }
if ( lx == 3 ) { this . showmyinfo ( ) ; } else { setTimeout ( 'RO.showmyinfo()' , 200 ) ; }
@@ -18,7 +18,7 @@ var a=deptarr,i,len=a.length,d,dn;$('#deptlist').html('');$('#list').html('')
for ( i = 0 ; i < len ; i ++ ) { d = a [ i ] ; if ( d . id == id ) dn = d ; if ( d . pid == id ) { d . face = 'images/wjj.png' ; this . showdeptlsit ( d , level + 1 ) ; } }
if ( level > 0 ) $ ( '#userdao' ) . append ( '<span class="jiantou">> </span>' ) ; $ ( '#userdao' ) . append ( '<span onclick="RO.showuserlists(' + id + ',0, this)">' + dn . name + '</span>' ) ; len = userarr . length ; var noi = 0 ; for ( i = 0 ; i < len ; i ++ ) { d = userarr [ i ] ; if ( d . deptid == id || d . deptidss . indexOf ( ',' + id + ',' ) > - 1 ) { this . showlist ( d , false ) ; noi ++ ; } }
if ( noi == 0 && $ ( '#deptlist' ) . html ( ) == '' ) { $ ( '#list' ) . append ( '<div style="font-size:14px;text-align:center;padding:30px 10px;color:#cccccc">' + dn . name + ' ' + this . bd6 ( '5LiL5peg6IGU57O75Lq6' ) + '</div>' ) ; } } , showdeptlsit : function ( a , level ) { var s = '' ; s += '<a class="weui_media_box weui_media_appmsg" onclick="RO.showuserlists(' + a . id + ',' + level + ')">' ; s += ' <div class="weui_cell_hd"><img src="' + a . face + '" style="width:34px;margin-right:5px;display:block"></div>' ; s += ' <div class="weui_cell_bd weui_cell_primary"><p>' + a . name + '' ; if ( a . ntotal > 0 ) s += ' <span style="font-size:12px;color:#888888">(' + a . ntotal + ')</span>' ; s += ' </p></div>' ; s += '</a>' ; $ ( '#deptlist' ) . append ( s ) ; } , showlist : function ( a , cbo ) { var s = '<a temp="user_' + a . id + '" onclick="RO.opu(' + a . id + ')" class="weui_media_box weui_media_appmsg">' ; s += ' <div class="weui_media_hd">' ; s += ' <img class="weui_media_appmsg_thumb" src="' + a . face + '">' ; s += ' </div>' ; s += ' <div class="weui_media_bd">' ; s += ' <h4 class="weui_media_title">' + a . name + '</h4>' ; s += ' <p class="weui_media_desc">' + a . deptname + '(' + a . ranking + ')</p>' ; s += ' </div>' ; s += '</a>' ; if ( ! cbo ) { $ ( '#list' ) . append ( s ) ; } else { $ ( '#sslst' ) . append ( s ) ; } } , showgroupall : function ( ) { var i , len2 = grouparr . length ; $ ( '#glist' ) . html ( '' ) ; $ ( '#glists' ) . html ( '(' + len2 + ')' ) ; for ( i = 0 ; i < len2 ; i ++ ) this . showgroup ( grouparr [ i ] , true ) ; } , showgroup : function ( a , cbo ) { var s = '' ; s += '<a class="weui_cell" onclick="RO.openguser(\'group\',' + a . id + ')">' ; s += ' <div class="weui_cell_hd"><img src="' + a . face + '" alt="" style="width:34px;margin-right:5px;display:block"></div>' ; s += ' <div class="weui_cell_bd weui_cell_primary"><p>' + a . name + '</p></div>' ; s += '</a>' ; $ ( '#glist' ) . append ( s ) ; } , shdata : { } , showhistory : function ( a ) { var i , len = a . length ; $ ( '#historylist' ) . html ( '' ) ; $ ( '#hwu_tems' ) . show ( ) ; for ( i = 0 ; i < len ; i ++ ) { this . showhistorys ( a [ i ] ) ; }
this . changestotl ( false , 0 ) ; if ( i > 0 ) $ ( '#hwu_tems' ) . hide ( ) ; } , showhistorys : function ( d , pad ) { var s , ty , o = $ ( '#historylist' ) , d1 , st , attr ; var num = '' + d . type + '_' + d . receid + '' ; $ ( '#index_' + num + '' ) . remove ( ) ; this . shdata [ num ] = d ; st = d . stotal ; if ( st == '0' ) st = '' ; var ops = d . optdt . substr ( 11 , 5 ) ; if ( d . optdt . indexOf ( date ) != 0 ) ops = d . optdt . substr ( 5 , 5 ) ; ty = d . type ; s = '<a id="index_' + num + '" onclick="RO.clickitems(\'' + ty + '\',' + d . receid + ', this)" class="weui_media_box weui_media_appmsg">'; s += ' <div class="weui_media_hd">' ; s += ' <img class="weui_media_appmsg_thumb" src="' + d . face + '">' ; s += ' </div>' ; s += ' <div class="weui_media_bd">' ; s += ' <span id="histotal_' + num + '" class="badge">' + st + '</span>' ; s += ' <font >' + ops + '</font>' ; s += ' <h4 class="weui_media_title">' + d . name + '</h4>' ; s += ' <p class="weui_media_desc">' + this . bd6 ( d . cont ) + '</p>' ; s += ' </div>' ; s += '</a>' ; if ( ! pad ) { o . append ( s ) ; } else { o . prepend ( s ) ; } } , clickitems : function ( ty , id , o ) { var o1 = $ ( o ) , num = '' + ty + '_' + id + '' , d = this . shdata [ num ] ; var da = [ { name : this . bd6 ( '5omT5byA' ) , lx : 0 } ] ; if ( d && d . stotal > 0 ) da . push ( { name : this . bd6 ( '5qCH6K!G5bey6K!7' ) , lx : 2 } ) ; da . push ( { name : this . bd6 ( '5Yig6Zmk5q2k6K6w5b2V' ) , lx : 1 } ) ; js . showmenu ( { data : da , onclick : function ( a ) { var lx = a . lx ; if ( lx == 0 ) { RO . openguser ( ty , id ) ; }
this . changestotl ( false , 0 ) ; if ( i > 0 ) $ ( '#hwu_tems' ) . hide ( ) ; } , showhistorys : function ( d , pad ) { var s , ty , o = $ ( '#historylist' ) , d1 , st , attr ; var num = '' + d . type + '_' + d . receid + '' ; $ ( '#index_' + num + '' ) . remove ( ) ; this . shdata [ num ] = d ; st = d . stotal ; if ( st == '0' ) st = '' ; var ops = d . optdt . substr ( 11 , 5 ) ; if ( d . optdt . indexOf ( date ) != 0 ) ops = d . optdt . substr ( 5 , 5 ) ; ty = d . type ; var bstr = new touchclass ( { type : ty , receid : d . receid , onlongclick : function ( ) { RO . clickitems ( this . type , this . receid , this . obj ) } , onclick : function ( ) { RO . openguser ( this . type , this . receid ) ; } } ) . touchstring ( ) ; s = '<a id="index_' + num + '" ' + bstr + ' class="weui_media_box weui_media_appmsg">'; s += ' <div class="weui_media_hd">' ; s += ' <img class="weui_media_appmsg_thumb" src="' + d . face + '">' ; s += ' </div>' ; s += ' <div class="weui_media_bd">' ; s += ' <span id="histotal_' + num + '" class="badge">' + st + '</span>' ; s += ' <font >' + ops + '</font>' ; s += ' <h4 class="weui_media_title">' + d . name + '</h4>' ; s += ' <p class="weui_media_desc">' + this . bd6 ( d . cont ) + '</p>' ; s += ' </div>' ; s += '</a>' ; if ( ! pad ) { o . append ( s ) ; } else { o . prepend ( s ) ; } } , clickitems : function ( ty , id , o ) { var o1 = $ ( o ) , num = '' + ty + '_' + id + '' , d = this . shdata [ num ] ; var da = [ { name : this . bd6 ( '5omT5byA' ) , lx : 0 } ] ; if ( d && d . stotal > 0 ) da . push ( { name : this . bd6 ( '5qCH6K!G5bey6K!7' ) , lx : 2 } ) ; da . push ( { name : this . bd6 ( '5Yig6Zmk5q2k6K6w5b2V' ) , lx : 1 } ) ; js . showmenu ( { data : da , onclick : function ( a ) { var lx = a . lx ; if ( lx == 0 ) { RO . openguser ( ty , id ) ; }
if ( lx == 1 ) { o1 . remove ( ) ; var tst = $ ( '#historylist' ) . text ( ) ; if ( tst == '' ) $ ( '#hwu_tems' ) . show ( ) ; js . ajax ( 'reim' , 'delhistory' , { type : ty , gid : id } , false , 'none' ) ; }
if ( lx == 2 ) { RO . biaoyidu ( ty , id , true ) ; } } } ) ; } , opu : function ( id ) { js . location ( '?a=userinfo&d=we&uid=' + id + '' ) ; } , biaoyidu : function ( ty , id , lbo ) { if ( lbo ) { var num = '' + ty + '_' + id + '' ; $ ( '#histotal_' + num + '' ) . html ( '' ) ; this . changestotl ( false , 0 ) ; var d = this . shdata [ num ] ; if ( d ) d . stotal = '0' ; }
js . ajax ( 'reim' , 'yiduall' , { type : ty , gid : id } , false , 'none' ) ; } , openguser : function ( ty , id ) { var num = '' + ty + '_' + id + '' ; $ ( '#histotal_' + num + '' ) . html ( '' ) ; this . changestotl ( false , 0 ) ; if ( ty == 'agent' ) { var d = this . shdata [ num ] ; var url = '' ; if ( d && d . stotal > 0 && ! isempt ( d . xgurl ) ) { d . stotal = '0' ; var xga = d . xgurl . split ( '|' ) ; if ( xga [ 1 ] > 0 ) url = 'task.php?a=x&num=' + xga [ 0 ] + '&mid=' + xga [ 1 ] + '' ; }