123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957 |
- {extend name="public/layout" /}
- {block name="body"}
- <script src="/static/js/jquery.min.js"></script>
- <style>
- html,body{
- width: 100%;
- height: 100%;
- font-family: "宋体";
- }
- .layui-layout-body{
- padding-top: 38px;
- }
- #LAY_app,#LAY_app_body,#layui-crmbox{
- display: block;
- width: 100%;
- height: 100%;
- }
- #LAY_app_body{
- position: relative;
- top: 0;
- left: 0;
- }
- .maindiv{
- width: calc( 100% - 160px ) !important;
- }
- .rightnavbox{
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- width: 160px;
- padding-top: 38px;
- border-right: 1px solid #CCC;
- height: calc(100vh - 40px);
- overflow-y: auto;
- }
- .main_left {
- width: 146px;
- margin-top: 8px;
- display: inline;
- padding-bottom: 5px;
- }
- .menu_title {
- width: 100%;
- height: 30px;
- background-color: #358105;
- text-align: center;
- font-size: 14px;
- font-weight: bold;
- color: #fff;
- line-height: 30px;
- overflow: hidden;
- letter-spacing: 1px;
- }
- .left_menu{ width:136px; margin-left:7px; margin-top:6px; margin-bottom:25px;}
- .left_menu dt{ font-weight:bold; background:url(__STATIC__/img/folder.gif) 0 3px no-repeat; text-indent:20px; height:25px; line-height:25px; border-bottom:1px solid #CCC; margin-top:6px;}
- .left_menu dt a{ color:#000}
- .left_menu dd{ width:120px; margin-left:12px; background:url(__STATIC__/img/file.gif) 1px 3px no-repeat; text-indent:20px; line-height:21px; margin-top:3px;border-bottom:1px dashed #CCC}
- .left_menu dd a{ color:#000}
- .left_menu dd a:hover{ color:#FF0000}
- .leftaddlog{
- display: block;
- width: 435px;
- height: calc( 100% - 38px ) !important;
- position: fixed;
- top: 38px;
- left:0;
- bottom: 0;
- }
- .leftaddlog iframe{
- display: block;
- width: 100%;
- height: 100%;
- }
- #LAY_app{
- box-sizing: border-box;
- }
- ::-webkit-scrollbar {
- width: 6px;
- height: auto;
- }
-
- ::-webkit-scrollbar-thumb {
- border-radius: 0px;
- -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
- background: #DFDFDF;
- }
-
- ::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
- border-radius: 0px;
- background: #f5f5f5;
- }
- </style>
- <body class="layui-layout-body">
- <div id="LAY_app">
- <div class="leftaddlog" style="display:none;">
- <iframe src=""></iframe>
- </div>
- <div id="layui-crmbox" class="layui-layout layui-layout-admin">
- {include file="index/header"}
- {include file="index/tabs"}
- <!-- 主体内容 -->
- <div class="layui-body" id="LAY_app_body">
- <div class="layadmin-tabsbody-item layui-show">
- <iframe src="{:url('index/welcome')}" frameborder="0" class="layadmin-iframe"></iframe>
- </div>
- </div>
- <!-- 辅助元素,一般用于移动设备下遮罩 -->
- <div class="layadmin-body-shade" layadmin-event="shade"></div>
- </div>
- <div class="rightnavbox" style="display:none;" >
- <div class="main_left">
- <div class="menu_title">导航菜单</div>
- <dl class="left_menu">
- {volist name="leftnav" id="vo" key="k"}
- {if $vo.ishref == 1}
- <dt><a class="everytopnav" lay-href="{:url($vo.url)}" {if $k == 1} title="后台首页" class="red" {/if}> {$vo.name}</a></dt>
- {else/}
- <dt>{$vo.name}</dt>
- {/if}
- {volist name="vo.child" id="p"}
- <dd><a class="everytopnav" lay-href="{:url($p.url)}">{$p.name}</a></dd>
- {/volist}
- {/volist}
- <!-- 客服端 -->
- <!-- <dt><a class="everytopnav" lay-href="{:url('index/welcome')}" title="后台首页" class="red">首页</a></dt>
- <dt>客户数据</dt>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/list')}">客户池</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/confirm_visit_list')}">到访</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/stay_confirm_list')}">待确认</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/repay_list')}">待回访</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/jiaoding_list')}">定金</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/achment_list')}">业绩</a></dd>
- <dt>统计学习</dt>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">日报</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/emp_daily')}">客服报表</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/invalid_report')}">无效报表</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/pool_list')}">公共库</a></dd>
- <dt><a class="everytopnav" lay-href="{:url('empcrm/search_list')}">搜索</a></dt> -->
- <!-- 管理端 -->
- <!-- <dt><a class="everytopnav" lay-href="{:url('index/welcome')}" title="后台首页" class="red">首页</a></dt>
- <dt>客户数据</dt>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/list')}">客户池</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/confirm_visit_list')}">到访</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/stay_confirm_list')}">待确认</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/repay_list')}">待回访</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/jiaoding_list')}">定金</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/achment_list')}">业绩</a></dd>
- <dt>相关报表</dt>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">年报明细</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">推广明细</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">日报</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">账户渠道</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/emp_daily')}">客服报表</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">设计师报表</a></dd>
- <dd><a class="everytopnav" lay-href="{:url('empcrm/invalid_report')}">无效报表</a></dd>
- <dt><a class="everytopnav" lay-href="{:url('empcrm/pool_list')}">公共库</a></dt>
- <dt><a class="everytopnav" lay-href="{:url('empcrm/search_list')}">搜索</a></dt>
- <dt><a class="everytopnav" lay-href="{:url('empcrm/search_list')}">校对</a></dt> -->
- </dl>
- </div>
- </div>
- </div>
- </body>
- <!--<body class="layui-layout-body">-->
- <!-- 这是登陆后首页-->
- <!--</body>-->
- {/block}
- {block name="js"}
- <script src="__LAYUI__/layui/layui.js"></script>
- <script>
- var reload=null,reload =null;
- layui.config({
- base: '__LAYUI__/' //静态资源所在路径
- }).extend({
- index: 'lib/index' //主入口模块
- }).use('index');
- for (var i = 0; i < $('.everytopnav').length; i++) {
- $('.everytopnav')[i].index = i;
- $($('.everytopnav')[i]).click(function () {
- let index = this.index;
- for (var j = 0; j < $('.everytopnav').length; j++) {
- $('.everytopnav')[j].classList.remove('nowclass');
- }
- $('.everytopnav')[index].classList.add('nowclass');
- let len = $('.layadmin-tabsbody-item');
- for (let i = 0; i < len.length; i++) {
- let str = $($('.layadmin-tabsbody-item')[i]).children('iframe')[0].src;
- if (str.indexOf('?') > -1) {
- $($('.layadmin-tabsbody-item')[i]).remove();
- }
- }
- // this.click();
- })
- }
- function openleftfun() {
- $('#LAY_app').css('padding-right','160px');
- $('.rightnavbox').show();
- }
- function closeleftfun() {
- $('#LAY_app').css('padding-right', '0px');
- $('.rightnavbox').hide();
- }
- function leftadd(weburl) {
- $('#LAY_app').css('padding-left', '435px');
- $('.leftaddlog iframe')[0].src = weburl;
- $('.leftaddlog').show();
- }
- function removealog() {
- $('#LAY_app').css('padding-left', '0');
- $('.leftaddlog iframe')[0].src = '';
- $('.leftaddlog').hide();
- }
- function signmsg(num,mod='empcrm'){
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/deposit_sign_detail.html?cid=' + num + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len=$('.layadmin-tabsbody-item');
- for(let j=0;j< len.length-1;j++){
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function gosearchlist(num,mod='empcrm') {
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint ="/empcrm/"+mod+"/search_list.html";
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if(char == appoint){
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- }else{
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/deposit_sign_detail.html?cid="+ num;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if(char1== appoint1){
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function editcrmsg(num,type,mod='empcrm') {
- let wetr= type ? ('&type='+ type) : '';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/edit_customer.html?id=' + num+ wetr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function gotonewlist(num,type) {
- if (type == 'share_list.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/community/repay_list.html";
- if(type){
- appoint = "/empcrm/community/" + "repay_list.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFunBack();
- } else if (type == 'generalStatistics.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/empcrm/generalStatistics.html";
- if(type){
- appoint = "/empcrm/empcrm/" + "generalStatistics.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- } else if (type == 'repay_list.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/community/repay_list.html";
- if(type){
- appoint = "/empcrm/community/" + "repay_list.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- } else {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/community/list.html";
- if(type){
- appoint = "/empcrm/community/"+ type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/community/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFun();
- }
- }
- function gotolist(num,type) {
- if (type == 'share_list.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/manager_emp/shareList.html";
- if(type){
- appoint = "/empcrm/manager_emp/" + "shareList.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFunBack();
- } else if (type == 'generalStatistics.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/empcrm/generalStatistics.html";
- if(type){
- appoint = "/empcrm/empcrm/" + "generalStatistics.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- } else {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/empcrm/list.html";
- if(type){
- appoint = "/empcrm/empcrm/"+ type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFun();
- }
- }
- function statemsg(num, type,mod='empcrm') {
- let wetr = type ? ('&type=' + type) : '';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/customer_detail.html?id=' + num+ wetr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function msgotonewlist(num, type) {
- if (type == 'share_list.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- if (type) {
- appoint = "/empcrm/manager_emp/shareList.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFunBack();
- } else if (type == 'generalStatistics.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- if (type) {
- appoint = "/empcrm/empcrm/generalStatistics.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- } else if (type == 'repay_list.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- if (type) {
- appoint = "/empcrm/community/repay_list.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- } else {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- // let appoint = "/empcrm/empcrm/list.html";
- if (type) {
- appoint = "/empcrm/community/" + type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/community/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFun();
- }
- }
- function msgotolist(num, type) {
- if (type == 'share_list.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- if (type) {
- appoint = "/empcrm/manager_emp/shareList.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFunBack();
- } else if (type == 'generalStatistics.html') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- if (type) {
- appoint = "/empcrm/empcrm/generalStatistics.html";
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- } else {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- // let appoint = "/empcrm/empcrm/list.html";
- if (type) {
- appoint = "/empcrm/empcrm/" + type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
-
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- window.reloadFun();
- }
- }
- function addcrmmsg(type,mod='empcrm') {
- let webstr= type ? ('type=' + type) : 'type=list.html';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/add_customer.html?'+ webstr +'" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function addgotolist(type,mod='empcrm') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('?type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/"+mod+"/list.html";
- if(type){
- appoint = "/empcrm/"+mod+"/"+ type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/"+mod+"/add_customer.html"+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function getinvalid(cid,type,mod='empcrm') {
- let webstr = type ? ('&type=' + type) : '&type=list.html';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/fetchpoolitem.html?cid='+cid + webstr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function goinvalidlist(num,type,mod='empcrm') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/"+mod+"/search_list.html";
- if (type) {
- appoint = "/empcrm/"+mod+"/" + type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/"+mod+"/fetchpoolitem.html?cid=" + num+ wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function editsigncrmsg(num, type,mod='empcrm') {
- let wetr = type ? ('&type=' + type) : '';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/signcus_detail.html?id=' + num + wetr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function gosignlist(num,type,mod='empcrm') {
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/"+mod+"/list.html";
- if (type) {
- appoint = "/empcrm/"+mod+"/" + type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/"+mod+"/signcus_detail.html?id=" + num + wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function openmsg(gourl,type){
- let wetr = type ? ('type=' + type) : '';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/manager_emp/'+gourl+'?' + wetr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function openeditmsg(num,type){
- let wetr = type ? ('&type=' + type) : '';
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/manager_emp/edit_extension.html?id=' + num + wetr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function closemsg(type){
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/manager_emp/list.html";
- if (type) {
- appoint = "/empcrm/manager_emp/" + type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/add_extension.html?" + wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function closereportmsg(num,type){
- let len = $('.layadmin-tabsbody-item');
- let wetr = type ? ('&type=' + type) : '';
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- let appoint = "/empcrm/manager_emp/list.html";
- if (type) {
- appoint = "/empcrm/manager_emp/" + type;
- }
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = "/empcrm/empcrm/edit_extension.html?id="+num + wetr;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function openbuildfun(openurl) {
- let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="' + openurl + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
- $('#LAY_app_body').append(str);
- let len = $('.layadmin-tabsbody-item');
- for (let j = 0; j < len.length - 1; j++) {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- }
- function backbuildfun(weburl,closeurl,type) {
- let len = $('.layadmin-tabsbody-item');
- let arr= weburl.split('&');
- let appoint = arr[1].split('=')[1];
- if(!!type){
- appoint = arr[type].split('=')[1];
- }
- let flag=false;
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint&& !flag) {
- flag=true;
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reloadfun();
- }, 100);
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = closeurl+"?" + weburl;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function backresourcefun(weburl, closeurl,type) {
- let len = $('.layadmin-tabsbody-item');
- let arr,appoint;
- if(type =='add'|| type =='add1'){
- appoint = weburl.split('=')[1];
- }else if(type=='distribution'){
- arr = weburl.split('&');
- appoint = arr[1].split('=')[1];
- } else if (type == 'handdistribution') {
- arr = weburl.split('&');
- if(!!arr[2]){
- appoint = arr[2].split('=')[1];
- }else{
- appoint = arr[1].split('=')[1];
- }
-
- }else if (!!type) {
- arr = weburl.split('&');
- appoint = arr[type].split('=')[1];
- }else{
- arr = weburl.split('&');
- appoint = arr[1].split('=')[1];
- }
- let flag = false;
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint && !flag) {
- flag = true;
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- if(type=='add'){
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
- }, 100);
- }else if (type == 'distribution') {
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.opoo();
- }, 100);
- }else if (type == 'handdistribution') {
- setTimeout(() => {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
- }, 100);
- }
-
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = closeurl + "?" + weburl;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- function distributionfun(id, count, str1,weburl){
- let len = $('.layadmin-tabsbody-item');
- let appoint= weburl;
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.assignCustomerFunc(id, count, str1);
- return false;
- }
- }
- }
- function backresourcefun1(weburl, closeurl, type) {
- let len = $('.layadmin-tabsbody-item');
- let arr, appoint;
- arr = weburl.split('&');
- appoint = arr[1].split('=')[1];
- for (let j = 0; j < len.length; j++) {
- let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src.split('?')[0];
- var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
- var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char == appoint) {
- $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
- setTimeout(() => {
- // $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
- $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.opoo();
- }, 100);
- } else {
- $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
- }
- let appoint1 = closeurl + "?" + weburl;
- var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
- var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
- if (char1 == appoint1) {
- $($('.layadmin-tabsbody-item')[j]).remove();
- }
- }
- }
- </script>
- {/block}
|