1
0

index.html 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957
  1. {extend name="public/layout" /}
  2. {block name="body"}
  3. <script src="/static/js/jquery.min.js"></script>
  4. <style>
  5. html,body{
  6. width: 100%;
  7. height: 100%;
  8. font-family: "宋体";
  9. }
  10. .layui-layout-body{
  11. padding-top: 38px;
  12. }
  13. #LAY_app,#LAY_app_body,#layui-crmbox{
  14. display: block;
  15. width: 100%;
  16. height: 100%;
  17. }
  18. #LAY_app_body{
  19. position: relative;
  20. top: 0;
  21. left: 0;
  22. }
  23. .maindiv{
  24. width: calc( 100% - 160px ) !important;
  25. }
  26. .rightnavbox{
  27. position: fixed;
  28. top: 0;
  29. right: 0;
  30. bottom: 0;
  31. width: 160px;
  32. padding-top: 38px;
  33. border-right: 1px solid #CCC;
  34. height: calc(100vh - 40px);
  35. overflow-y: auto;
  36. }
  37. .main_left {
  38. width: 146px;
  39. margin-top: 8px;
  40. display: inline;
  41. padding-bottom: 5px;
  42. }
  43. .menu_title {
  44. width: 100%;
  45. height: 30px;
  46. background-color: #358105;
  47. text-align: center;
  48. font-size: 14px;
  49. font-weight: bold;
  50. color: #fff;
  51. line-height: 30px;
  52. overflow: hidden;
  53. letter-spacing: 1px;
  54. }
  55. .left_menu{ width:136px; margin-left:7px; margin-top:6px; margin-bottom:25px;}
  56. .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;}
  57. .left_menu dt a{ color:#000}
  58. .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}
  59. .left_menu dd a{ color:#000}
  60. .left_menu dd a:hover{ color:#FF0000}
  61. .leftaddlog{
  62. display: block;
  63. width: 435px;
  64. height: calc( 100% - 38px ) !important;
  65. position: fixed;
  66. top: 38px;
  67. left:0;
  68. bottom: 0;
  69. }
  70. .leftaddlog iframe{
  71. display: block;
  72. width: 100%;
  73. height: 100%;
  74. }
  75. #LAY_app{
  76. box-sizing: border-box;
  77. }
  78. ::-webkit-scrollbar {
  79. width: 6px;
  80. height: auto;
  81. }
  82. ::-webkit-scrollbar-thumb {
  83. border-radius: 0px;
  84. -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  85. background: #DFDFDF;
  86. }
  87. ::-webkit-scrollbar-track {
  88. -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  89. border-radius: 0px;
  90. background: #f5f5f5;
  91. }
  92. </style>
  93. <body class="layui-layout-body">
  94. <div id="LAY_app">
  95. <div class="leftaddlog" style="display:none;">
  96. <iframe src=""></iframe>
  97. </div>
  98. <div id="layui-crmbox" class="layui-layout layui-layout-admin">
  99. {include file="index/header"}
  100. {include file="index/tabs"}
  101. <!-- 主体内容 -->
  102. <div class="layui-body" id="LAY_app_body">
  103. <div class="layadmin-tabsbody-item layui-show">
  104. <iframe src="{:url('index/welcome')}" frameborder="0" class="layadmin-iframe"></iframe>
  105. </div>
  106. </div>
  107. <!-- 辅助元素,一般用于移动设备下遮罩 -->
  108. <div class="layadmin-body-shade" layadmin-event="shade"></div>
  109. </div>
  110. <div class="rightnavbox" style="display:none;" >
  111. <div class="main_left">
  112. <div class="menu_title">导航菜单</div>
  113. <dl class="left_menu">
  114. {volist name="leftnav" id="vo" key="k"}
  115. {if $vo.ishref == 1}
  116. <dt><a class="everytopnav" lay-href="{:url($vo.url)}" {if $k == 1} title="后台首页" class="red" {/if}> {$vo.name}</a></dt>
  117. {else/}
  118. <dt>{$vo.name}</dt>
  119. {/if}
  120. {volist name="vo.child" id="p"}
  121. <dd><a class="everytopnav" lay-href="{:url($p.url)}">{$p.name}</a></dd>
  122. {/volist}
  123. {/volist}
  124. <!-- 客服端 -->
  125. <!-- <dt><a class="everytopnav" lay-href="{:url('index/welcome')}" title="后台首页" class="red">首页</a></dt>
  126. <dt>客户数据</dt>
  127. <dd><a class="everytopnav" lay-href="{:url('empcrm/list')}">客户池</a></dd>
  128. <dd><a class="everytopnav" lay-href="{:url('empcrm/confirm_visit_list')}">到访</a></dd>
  129. <dd><a class="everytopnav" lay-href="{:url('empcrm/stay_confirm_list')}">待确认</a></dd>
  130. <dd><a class="everytopnav" lay-href="{:url('empcrm/repay_list')}">待回访</a></dd>
  131. <dd><a class="everytopnav" lay-href="{:url('empcrm/jiaoding_list')}">定金</a></dd>
  132. <dd><a class="everytopnav" lay-href="{:url('empcrm/achment_list')}">业绩</a></dd>
  133. <dt>统计学习</dt>
  134. <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">日报</a></dd>
  135. <dd><a class="everytopnav" lay-href="{:url('empcrm/emp_daily')}">客服报表</a></dd>
  136. <dd><a class="everytopnav" lay-href="{:url('empcrm/invalid_report')}">无效报表</a></dd>
  137. <dd><a class="everytopnav" lay-href="{:url('empcrm/pool_list')}">公共库</a></dd>
  138. <dt><a class="everytopnav" lay-href="{:url('empcrm/search_list')}">搜索</a></dt> -->
  139. <!-- 管理端 -->
  140. <!-- <dt><a class="everytopnav" lay-href="{:url('index/welcome')}" title="后台首页" class="red">首页</a></dt>
  141. <dt>客户数据</dt>
  142. <dd><a class="everytopnav" lay-href="{:url('empcrm/list')}">客户池</a></dd>
  143. <dd><a class="everytopnav" lay-href="{:url('empcrm/confirm_visit_list')}">到访</a></dd>
  144. <dd><a class="everytopnav" lay-href="{:url('empcrm/stay_confirm_list')}">待确认</a></dd>
  145. <dd><a class="everytopnav" lay-href="{:url('empcrm/repay_list')}">待回访</a></dd>
  146. <dd><a class="everytopnav" lay-href="{:url('empcrm/jiaoding_list')}">定金</a></dd>
  147. <dd><a class="everytopnav" lay-href="{:url('empcrm/achment_list')}">业绩</a></dd>
  148. <dt>相关报表</dt>
  149. <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">年报明细</a></dd>
  150. <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">推广明细</a></dd>
  151. <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">日报</a></dd>
  152. <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">账户渠道</a></dd>
  153. <dd><a class="everytopnav" lay-href="{:url('empcrm/emp_daily')}">客服报表</a></dd>
  154. <dd><a class="everytopnav" lay-href="{:url('empcrm/daily')}">设计师报表</a></dd>
  155. <dd><a class="everytopnav" lay-href="{:url('empcrm/invalid_report')}">无效报表</a></dd>
  156. <dt><a class="everytopnav" lay-href="{:url('empcrm/pool_list')}">公共库</a></dt>
  157. <dt><a class="everytopnav" lay-href="{:url('empcrm/search_list')}">搜索</a></dt>
  158. <dt><a class="everytopnav" lay-href="{:url('empcrm/search_list')}">校对</a></dt> -->
  159. </dl>
  160. </div>
  161. </div>
  162. </div>
  163. </body>
  164. <!--<body class="layui-layout-body">-->
  165. <!-- 这是登陆后首页-->
  166. <!--</body>-->
  167. {/block}
  168. {block name="js"}
  169. <script src="__LAYUI__/layui/layui.js"></script>
  170. <script>
  171. var reload=null,reload =null;
  172. layui.config({
  173. base: '__LAYUI__/' //静态资源所在路径
  174. }).extend({
  175. index: 'lib/index' //主入口模块
  176. }).use('index');
  177. for (var i = 0; i < $('.everytopnav').length; i++) {
  178. $('.everytopnav')[i].index = i;
  179. $($('.everytopnav')[i]).click(function () {
  180. let index = this.index;
  181. for (var j = 0; j < $('.everytopnav').length; j++) {
  182. $('.everytopnav')[j].classList.remove('nowclass');
  183. }
  184. $('.everytopnav')[index].classList.add('nowclass');
  185. let len = $('.layadmin-tabsbody-item');
  186. for (let i = 0; i < len.length; i++) {
  187. let str = $($('.layadmin-tabsbody-item')[i]).children('iframe')[0].src;
  188. if (str.indexOf('?') > -1) {
  189. $($('.layadmin-tabsbody-item')[i]).remove();
  190. }
  191. }
  192. // this.click();
  193. })
  194. }
  195. function openleftfun() {
  196. $('#LAY_app').css('padding-right','160px');
  197. $('.rightnavbox').show();
  198. }
  199. function closeleftfun() {
  200. $('#LAY_app').css('padding-right', '0px');
  201. $('.rightnavbox').hide();
  202. }
  203. function leftadd(weburl) {
  204. $('#LAY_app').css('padding-left', '435px');
  205. $('.leftaddlog iframe')[0].src = weburl;
  206. $('.leftaddlog').show();
  207. }
  208. function removealog() {
  209. $('#LAY_app').css('padding-left', '0');
  210. $('.leftaddlog iframe')[0].src = '';
  211. $('.leftaddlog').hide();
  212. }
  213. function signmsg(num,mod='empcrm'){
  214. 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>';
  215. $('#LAY_app_body').append(str);
  216. let len=$('.layadmin-tabsbody-item');
  217. for(let j=0;j< len.length-1;j++){
  218. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  219. }
  220. }
  221. function gosearchlist(num,mod='empcrm') {
  222. let len = $('.layadmin-tabsbody-item');
  223. for (let j = 0; j < len.length; j++) {
  224. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  225. let appoint ="/empcrm/"+mod+"/search_list.html";
  226. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  227. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  228. if(char == appoint){
  229. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  230. }else{
  231. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  232. }
  233. let appoint1 = "/empcrm/empcrm/deposit_sign_detail.html?cid="+ num;
  234. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  235. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  236. if(char1== appoint1){
  237. $($('.layadmin-tabsbody-item')[j]).remove();
  238. }
  239. }
  240. }
  241. function editcrmsg(num,type,mod='empcrm') {
  242. let wetr= type ? ('&type='+ type) : '';
  243. 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>';
  244. $('#LAY_app_body').append(str);
  245. let len = $('.layadmin-tabsbody-item');
  246. for (let j = 0; j < len.length - 1; j++) {
  247. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  248. }
  249. }
  250. function gotonewlist(num,type) {
  251. if (type == 'share_list.html') {
  252. let len = $('.layadmin-tabsbody-item');
  253. let wetr = type ? ('&type=' + type) : '';
  254. for (let j = 0; j < len.length; j++) {
  255. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  256. let appoint = "/empcrm/community/repay_list.html";
  257. if(type){
  258. appoint = "/empcrm/community/" + "repay_list.html";
  259. }
  260. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  261. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  262. if (char == appoint) {
  263. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  264. } else {
  265. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  266. }
  267. let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
  268. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  269. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  270. if (char1 == appoint1) {
  271. $($('.layadmin-tabsbody-item')[j]).remove();
  272. }
  273. }
  274. window.reloadFunBack();
  275. } else if (type == 'generalStatistics.html') {
  276. let len = $('.layadmin-tabsbody-item');
  277. let wetr = type ? ('&type=' + type) : '';
  278. for (let j = 0; j < len.length; j++) {
  279. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  280. let appoint = "/empcrm/empcrm/generalStatistics.html";
  281. if(type){
  282. appoint = "/empcrm/empcrm/" + "generalStatistics.html";
  283. }
  284. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  285. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  286. if (char == appoint) {
  287. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  288. } else {
  289. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  290. }
  291. let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
  292. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  293. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  294. if (char1 == appoint1) {
  295. $($('.layadmin-tabsbody-item')[j]).remove();
  296. }
  297. }
  298. } else if (type == 'repay_list.html') {
  299. let len = $('.layadmin-tabsbody-item');
  300. let wetr = type ? ('&type=' + type) : '';
  301. for (let j = 0; j < len.length; j++) {
  302. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  303. let appoint = "/empcrm/community/repay_list.html";
  304. if(type){
  305. appoint = "/empcrm/community/" + "repay_list.html";
  306. }
  307. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  308. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  309. if (char == appoint) {
  310. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  311. } else {
  312. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  313. }
  314. let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
  315. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  316. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  317. if (char1 == appoint1) {
  318. $($('.layadmin-tabsbody-item')[j]).remove();
  319. }
  320. }
  321. } else {
  322. let len = $('.layadmin-tabsbody-item');
  323. let wetr = type ? ('&type=' + type) : '';
  324. for (let j = 0; j < len.length; j++) {
  325. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  326. let appoint = "/empcrm/community/list.html";
  327. if(type){
  328. appoint = "/empcrm/community/"+ type;
  329. }
  330. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  331. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  332. if (char == appoint) {
  333. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  334. } else {
  335. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  336. }
  337. let appoint1 = "/empcrm/community/edit_customer.html?id=" + num+ wetr;
  338. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  339. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  340. if (char1 == appoint1) {
  341. $($('.layadmin-tabsbody-item')[j]).remove();
  342. }
  343. }
  344. window.reloadFun();
  345. }
  346. }
  347. function gotolist(num,type) {
  348. if (type == 'share_list.html') {
  349. let len = $('.layadmin-tabsbody-item');
  350. let wetr = type ? ('&type=' + type) : '';
  351. for (let j = 0; j < len.length; j++) {
  352. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  353. let appoint = "/empcrm/manager_emp/shareList.html";
  354. if(type){
  355. appoint = "/empcrm/manager_emp/" + "shareList.html";
  356. }
  357. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  358. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  359. if (char == appoint) {
  360. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  361. } else {
  362. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  363. }
  364. let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
  365. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  366. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  367. if (char1 == appoint1) {
  368. $($('.layadmin-tabsbody-item')[j]).remove();
  369. }
  370. }
  371. window.reloadFunBack();
  372. } else if (type == 'generalStatistics.html') {
  373. let len = $('.layadmin-tabsbody-item');
  374. let wetr = type ? ('&type=' + type) : '';
  375. for (let j = 0; j < len.length; j++) {
  376. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  377. let appoint = "/empcrm/empcrm/generalStatistics.html";
  378. if(type){
  379. appoint = "/empcrm/empcrm/" + "generalStatistics.html";
  380. }
  381. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  382. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  383. if (char == appoint) {
  384. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  385. } else {
  386. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  387. }
  388. let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
  389. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  390. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  391. if (char1 == appoint1) {
  392. $($('.layadmin-tabsbody-item')[j]).remove();
  393. }
  394. }
  395. } else {
  396. let len = $('.layadmin-tabsbody-item');
  397. let wetr = type ? ('&type=' + type) : '';
  398. for (let j = 0; j < len.length; j++) {
  399. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  400. let appoint = "/empcrm/empcrm/list.html";
  401. if(type){
  402. appoint = "/empcrm/empcrm/"+ type;
  403. }
  404. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  405. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  406. if (char == appoint) {
  407. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  408. } else {
  409. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  410. }
  411. let appoint1 = "/empcrm/empcrm/edit_customer.html?id=" + num+ wetr;
  412. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  413. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  414. if (char1 == appoint1) {
  415. $($('.layadmin-tabsbody-item')[j]).remove();
  416. }
  417. }
  418. window.reloadFun();
  419. }
  420. }
  421. function statemsg(num, type,mod='empcrm') {
  422. let wetr = type ? ('&type=' + type) : '';
  423. 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>';
  424. $('#LAY_app_body').append(str);
  425. let len = $('.layadmin-tabsbody-item');
  426. for (let j = 0; j < len.length - 1; j++) {
  427. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  428. }
  429. }
  430. function msgotonewlist(num, type) {
  431. if (type == 'share_list.html') {
  432. let len = $('.layadmin-tabsbody-item');
  433. let wetr = type ? ('&type=' + type) : '';
  434. for (let j = 0; j < len.length; j++) {
  435. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  436. if (type) {
  437. appoint = "/empcrm/manager_emp/shareList.html";
  438. }
  439. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  440. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  441. if (char == appoint) {
  442. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  443. setTimeout(() => {
  444. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  445. }, 100);
  446. } else {
  447. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  448. }
  449. let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
  450. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  451. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  452. if (char1 == appoint1) {
  453. $($('.layadmin-tabsbody-item')[j]).remove();
  454. }
  455. }
  456. window.reloadFunBack();
  457. } else if (type == 'generalStatistics.html') {
  458. let len = $('.layadmin-tabsbody-item');
  459. let wetr = type ? ('&type=' + type) : '';
  460. for (let j = 0; j < len.length; j++) {
  461. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  462. if (type) {
  463. appoint = "/empcrm/empcrm/generalStatistics.html";
  464. }
  465. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  466. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  467. if (char == appoint) {
  468. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  469. setTimeout(() => {
  470. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  471. }, 100);
  472. } else {
  473. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  474. }
  475. let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
  476. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  477. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  478. if (char1 == appoint1) {
  479. $($('.layadmin-tabsbody-item')[j]).remove();
  480. }
  481. }
  482. } else if (type == 'repay_list.html') {
  483. let len = $('.layadmin-tabsbody-item');
  484. let wetr = type ? ('&type=' + type) : '';
  485. for (let j = 0; j < len.length; j++) {
  486. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  487. if (type) {
  488. appoint = "/empcrm/community/repay_list.html";
  489. }
  490. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  491. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  492. if (char == appoint) {
  493. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  494. setTimeout(() => {
  495. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  496. }, 100);
  497. } else {
  498. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  499. }
  500. let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
  501. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  502. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  503. if (char1 == appoint1) {
  504. $($('.layadmin-tabsbody-item')[j]).remove();
  505. }
  506. }
  507. } else {
  508. let len = $('.layadmin-tabsbody-item');
  509. let wetr = type ? ('&type=' + type) : '';
  510. for (let j = 0; j < len.length; j++) {
  511. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  512. // let appoint = "/empcrm/empcrm/list.html";
  513. if (type) {
  514. appoint = "/empcrm/community/" + type;
  515. }
  516. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  517. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  518. if (char == appoint) {
  519. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  520. setTimeout(() => {
  521. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  522. }, 100);
  523. } else {
  524. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  525. }
  526. let appoint1 = "/empcrm/community/customer_detail.html?id=" + num+ wetr;
  527. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  528. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  529. if (char1 == appoint1) {
  530. $($('.layadmin-tabsbody-item')[j]).remove();
  531. }
  532. }
  533. window.reloadFun();
  534. }
  535. }
  536. function msgotolist(num, type) {
  537. if (type == 'share_list.html') {
  538. let len = $('.layadmin-tabsbody-item');
  539. let wetr = type ? ('&type=' + type) : '';
  540. for (let j = 0; j < len.length; j++) {
  541. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  542. if (type) {
  543. appoint = "/empcrm/manager_emp/shareList.html";
  544. }
  545. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  546. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  547. if (char == appoint) {
  548. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  549. setTimeout(() => {
  550. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  551. }, 100);
  552. } else {
  553. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  554. }
  555. let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
  556. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  557. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  558. if (char1 == appoint1) {
  559. $($('.layadmin-tabsbody-item')[j]).remove();
  560. }
  561. }
  562. window.reloadFunBack();
  563. } else if (type == 'generalStatistics.html') {
  564. let len = $('.layadmin-tabsbody-item');
  565. let wetr = type ? ('&type=' + type) : '';
  566. for (let j = 0; j < len.length; j++) {
  567. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  568. if (type) {
  569. appoint = "/empcrm/empcrm/generalStatistics.html";
  570. }
  571. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  572. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  573. if (char == appoint) {
  574. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  575. setTimeout(() => {
  576. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  577. }, 100);
  578. } else {
  579. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  580. }
  581. let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
  582. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  583. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  584. if (char1 == appoint1) {
  585. $($('.layadmin-tabsbody-item')[j]).remove();
  586. }
  587. }
  588. } else {
  589. let len = $('.layadmin-tabsbody-item');
  590. let wetr = type ? ('&type=' + type) : '';
  591. for (let j = 0; j < len.length; j++) {
  592. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  593. // let appoint = "/empcrm/empcrm/list.html";
  594. if (type) {
  595. appoint = "/empcrm/empcrm/" + type;
  596. }
  597. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  598. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  599. if (char == appoint) {
  600. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  601. setTimeout(() => {
  602. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.resizefun()
  603. }, 100);
  604. } else {
  605. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  606. }
  607. let appoint1 = "/empcrm/empcrm/customer_detail.html?id=" + num+ wetr;
  608. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  609. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  610. if (char1 == appoint1) {
  611. $($('.layadmin-tabsbody-item')[j]).remove();
  612. }
  613. }
  614. window.reloadFun();
  615. }
  616. }
  617. function addcrmmsg(type,mod='empcrm') {
  618. let webstr= type ? ('type=' + type) : 'type=list.html';
  619. let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/'+mod+'/add_customer.html?'+ webstr +'" frameborder = "0" class="layadmin-iframe"></iframe></div>';
  620. $('#LAY_app_body').append(str);
  621. let len = $('.layadmin-tabsbody-item');
  622. for (let j = 0; j < len.length - 1; j++) {
  623. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  624. }
  625. }
  626. function addgotolist(type,mod='empcrm') {
  627. let len = $('.layadmin-tabsbody-item');
  628. let wetr = type ? ('?type=' + type) : '';
  629. for (let j = 0; j < len.length; j++) {
  630. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  631. let appoint = "/empcrm/"+mod+"/list.html";
  632. if(type){
  633. appoint = "/empcrm/"+mod+"/"+ type;
  634. }
  635. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  636. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  637. if (char == appoint) {
  638. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  639. } else {
  640. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  641. }
  642. let appoint1 = "/empcrm/"+mod+"/add_customer.html"+ wetr;
  643. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  644. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  645. if (char1 == appoint1) {
  646. $($('.layadmin-tabsbody-item')[j]).remove();
  647. }
  648. }
  649. }
  650. function getinvalid(cid,type,mod='empcrm') {
  651. let webstr = type ? ('&type=' + type) : '&type=list.html';
  652. 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>';
  653. $('#LAY_app_body').append(str);
  654. let len = $('.layadmin-tabsbody-item');
  655. for (let j = 0; j < len.length - 1; j++) {
  656. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  657. }
  658. }
  659. function goinvalidlist(num,type,mod='empcrm') {
  660. let len = $('.layadmin-tabsbody-item');
  661. let wetr = type ? ('&type=' + type) : '';
  662. for (let j = 0; j < len.length; j++) {
  663. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  664. let appoint = "/empcrm/"+mod+"/search_list.html";
  665. if (type) {
  666. appoint = "/empcrm/"+mod+"/" + type;
  667. }
  668. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  669. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  670. if (char == appoint) {
  671. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  672. } else {
  673. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  674. }
  675. let appoint1 = "/empcrm/"+mod+"/fetchpoolitem.html?cid=" + num+ wetr;
  676. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  677. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  678. if (char1 == appoint1) {
  679. $($('.layadmin-tabsbody-item')[j]).remove();
  680. }
  681. }
  682. }
  683. function editsigncrmsg(num, type,mod='empcrm') {
  684. let wetr = type ? ('&type=' + type) : '';
  685. 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>';
  686. $('#LAY_app_body').append(str);
  687. let len = $('.layadmin-tabsbody-item');
  688. for (let j = 0; j < len.length - 1; j++) {
  689. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  690. }
  691. }
  692. function gosignlist(num,type,mod='empcrm') {
  693. let len = $('.layadmin-tabsbody-item');
  694. let wetr = type ? ('&type=' + type) : '';
  695. for (let j = 0; j < len.length; j++) {
  696. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  697. let appoint = "/empcrm/"+mod+"/list.html";
  698. if (type) {
  699. appoint = "/empcrm/"+mod+"/" + type;
  700. }
  701. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  702. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  703. if (char == appoint) {
  704. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  705. } else {
  706. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  707. }
  708. let appoint1 = "/empcrm/"+mod+"/signcus_detail.html?id=" + num + wetr;
  709. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  710. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  711. if (char1 == appoint1) {
  712. $($('.layadmin-tabsbody-item')[j]).remove();
  713. }
  714. }
  715. }
  716. function openmsg(gourl,type){
  717. let wetr = type ? ('type=' + type) : '';
  718. let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="/empcrm/manager_emp/'+gourl+'?' + wetr + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
  719. $('#LAY_app_body').append(str);
  720. let len = $('.layadmin-tabsbody-item');
  721. for (let j = 0; j < len.length - 1; j++) {
  722. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  723. }
  724. }
  725. function openeditmsg(num,type){
  726. let wetr = type ? ('&type=' + type) : '';
  727. 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>';
  728. $('#LAY_app_body').append(str);
  729. let len = $('.layadmin-tabsbody-item');
  730. for (let j = 0; j < len.length - 1; j++) {
  731. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  732. }
  733. }
  734. function closemsg(type){
  735. let len = $('.layadmin-tabsbody-item');
  736. let wetr = type ? ('type=' + type) : '';
  737. for (let j = 0; j < len.length; j++) {
  738. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  739. let appoint = "/empcrm/manager_emp/list.html";
  740. if (type) {
  741. appoint = "/empcrm/manager_emp/" + type;
  742. }
  743. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  744. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  745. if (char == appoint) {
  746. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  747. } else {
  748. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  749. }
  750. let appoint1 = "/empcrm/empcrm/add_extension.html?" + wetr;
  751. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  752. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  753. if (char1 == appoint1) {
  754. $($('.layadmin-tabsbody-item')[j]).remove();
  755. }
  756. }
  757. }
  758. function closereportmsg(num,type){
  759. let len = $('.layadmin-tabsbody-item');
  760. let wetr = type ? ('&type=' + type) : '';
  761. for (let j = 0; j < len.length; j++) {
  762. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  763. let appoint = "/empcrm/manager_emp/list.html";
  764. if (type) {
  765. appoint = "/empcrm/manager_emp/" + type;
  766. }
  767. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  768. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  769. if (char == appoint) {
  770. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  771. } else {
  772. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  773. }
  774. let appoint1 = "/empcrm/empcrm/edit_extension.html?id="+num + wetr;
  775. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  776. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  777. if (char1 == appoint1) {
  778. $($('.layadmin-tabsbody-item')[j]).remove();
  779. }
  780. }
  781. }
  782. function openbuildfun(openurl) {
  783. let str = '<div class="layadmin-tabsbody-item layui-show"><iframe src="' + openurl + '" frameborder = "0" class="layadmin-iframe"></iframe></div>';
  784. $('#LAY_app_body').append(str);
  785. let len = $('.layadmin-tabsbody-item');
  786. for (let j = 0; j < len.length - 1; j++) {
  787. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  788. }
  789. }
  790. function backbuildfun(weburl,closeurl,type) {
  791. let len = $('.layadmin-tabsbody-item');
  792. let arr= weburl.split('&');
  793. let appoint = arr[1].split('=')[1];
  794. if(!!type){
  795. appoint = arr[type].split('=')[1];
  796. }
  797. let flag=false;
  798. for (let j = 0; j < len.length; j++) {
  799. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  800. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  801. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  802. if (char == appoint&& !flag) {
  803. flag=true;
  804. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  805. setTimeout(() => {
  806. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reloadfun();
  807. }, 100);
  808. } else {
  809. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  810. }
  811. let appoint1 = closeurl+"?" + weburl;
  812. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  813. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  814. if (char1 == appoint1) {
  815. $($('.layadmin-tabsbody-item')[j]).remove();
  816. }
  817. }
  818. }
  819. function backresourcefun(weburl, closeurl,type) {
  820. let len = $('.layadmin-tabsbody-item');
  821. let arr,appoint;
  822. if(type =='add'|| type =='add1'){
  823. appoint = weburl.split('=')[1];
  824. }else if(type=='distribution'){
  825. arr = weburl.split('&');
  826. appoint = arr[1].split('=')[1];
  827. } else if (type == 'handdistribution') {
  828. arr = weburl.split('&');
  829. if(!!arr[2]){
  830. appoint = arr[2].split('=')[1];
  831. }else{
  832. appoint = arr[1].split('=')[1];
  833. }
  834. }else if (!!type) {
  835. arr = weburl.split('&');
  836. appoint = arr[type].split('=')[1];
  837. }else{
  838. arr = weburl.split('&');
  839. appoint = arr[1].split('=')[1];
  840. }
  841. let flag = false;
  842. for (let j = 0; j < len.length; j++) {
  843. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  844. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  845. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  846. if (char == appoint && !flag) {
  847. flag = true;
  848. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  849. if(type=='add'){
  850. setTimeout(() => {
  851. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
  852. }, 100);
  853. }else if (type == 'distribution') {
  854. setTimeout(() => {
  855. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
  856. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.opoo();
  857. }, 100);
  858. }else if (type == 'handdistribution') {
  859. setTimeout(() => {
  860. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
  861. }, 100);
  862. }
  863. } else {
  864. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  865. }
  866. let appoint1 = closeurl + "?" + weburl;
  867. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  868. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  869. if (char1 == appoint1) {
  870. $($('.layadmin-tabsbody-item')[j]).remove();
  871. }
  872. }
  873. }
  874. function distributionfun(id, count, str1,weburl){
  875. let len = $('.layadmin-tabsbody-item');
  876. let appoint= weburl;
  877. for (let j = 0; j < len.length; j++) {
  878. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src;
  879. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  880. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  881. if (char == appoint) {
  882. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.assignCustomerFunc(id, count, str1);
  883. return false;
  884. }
  885. }
  886. }
  887. function backresourcefun1(weburl, closeurl, type) {
  888. let len = $('.layadmin-tabsbody-item');
  889. let arr, appoint;
  890. arr = weburl.split('&');
  891. appoint = arr[1].split('=')[1];
  892. for (let j = 0; j < len.length; j++) {
  893. let str = $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].src.split('?')[0];
  894. var start = str.length - appoint.length; //相差长度=字符串长度-特定字符长度
  895. var char = str.substr(start, appoint.length);//将相差长度作为开始下标,特定字符长度为截取长度
  896. if (char == appoint) {
  897. $($('.layadmin-tabsbody-item')[j]).addClass('layui-show');
  898. setTimeout(() => {
  899. // $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.reload();
  900. $($('.layadmin-tabsbody-item')[j]).children('iframe')[0].contentDocument.defaultView.opoo();
  901. }, 100);
  902. } else {
  903. $($('.layadmin-tabsbody-item')[j]).removeClass('layui-show');
  904. }
  905. let appoint1 = closeurl + "?" + weburl;
  906. var start = str.length - appoint1.length; //相差长度=字符串长度-特定字符长度
  907. var char1 = str.substr(start, appoint1.length);//将相差长度作为开始下标,特定字符长度为截取长度
  908. if (char1 == appoint1) {
  909. $($('.layadmin-tabsbody-item')[j]).remove();
  910. }
  911. }
  912. }
  913. </script>
  914. {/block}