index.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. {extend name="public/layout"/} {block name="title"}在施工地{/block} {block name="body"}
  2. <link rel="stylesheet" href="__STATIC__/css/csspc.css">
  3. <link rel="stylesheet" href="__STATIC__/css/font.css">
  4. <style>
  5. *{box-sizing: initial;}
  6. .font12{font-size: 12px !important;}
  7. .font14{font-size: 14px !important;}
  8. .font16{font-size: 16px !important;}
  9. html{min-width:1420px;margin:0 auto;width:100%;}
  10. body{background: #EEEEEE;height: 100%;width:100%;color:#333;}
  11. .layui-fluid {
  12. display: block;
  13. box-shadow: 0 0 4px 0 #B6CADE;
  14. border-radius: 5px;
  15. margin: 15px;
  16. background-color: #ffffff;
  17. padding: 10px 30px;
  18. }
  19. .layui-card{overflow: hidden;background: #fff;}
  20. .rst_box_top{
  21. background: #fff;
  22. padding:9px 25px 1px;
  23. border-radius: 8px;
  24. }
  25. .layui-tab-title .layui-this:after {
  26. width: 50px !important;
  27. }
  28. .mdt20{margin-top:10px;}
  29. .layui-tab-brief>.layui-tab-more li.layui-this:after, .layui-tab-brief>.layui-tab-title .layui-this:after{border-bottom:4px solid #28A1FF !important;}
  30. .rst_box_m{
  31. border-radius: 8px;background: #fff;overflow: hidden;
  32. padding: 28px 0;
  33. box-shadow: 0px 0px 4px 3px #f5f5f5;
  34. width: 98%;
  35. margin:30px auto 0;
  36. }
  37. .rst_box_m_ul{overflow: hidden;}
  38. .rst_box_m_ul li{float:left;width:16.66%;text-align: center;}
  39. .Impact{font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;}
  40. .huise333{color:#333;}
  41. .layui-card .layui-tab-brief .layui-tab-content{padding: 0;}
  42. .rst_box_b_left{background: #fff;border-radius: 8px;overflow: hidden;}
  43. .rst_box_b_left_X{width:4px;height: 24px;background: #28A1FF;border-radius: 2px;overflow: hidden;position: relative;top: 2px;}
  44. .rst_box_b_left_time{background: #F3F3F3;border-radius: 4px;}
  45. .searchIco{right:5%;font-size:16px;color:#28A1FF;top:0; text-align: center;line-height: 38px;}
  46. .rst_box_b_left_input{width:24%;border:1px solid #ECECEC;}
  47. .rst_box_b_left_input select{width:100%;height:38px;}
  48. .layui-input-block{margin:0;}
  49. .layui-form-item{margin-bottom:0;clear:initial;}
  50. input{font-size: 14px !important;}
  51. .mdl01_5{margin-left:1.5%;}
  52. .layui-form-label{width:auto;padding:5px 2px;}
  53. .huise999{color:#999 !important;}
  54. .rst_box_b_left_yuan1{background: #7EC6FF;border-radius: 50%;padding:2px;z-index: 5;}
  55. .rst_box_b_left_yuan2{background: #28A1FF;width:12px;height: 12px;border-radius: 50%;}
  56. .rst_box_b_left_tx{border-radius: 50%;width:30px;height: 30px;}
  57. .rst_box_b_left_ul .bor_xs{height: 90px;border-left:1px dashed #CCCCCC;z-index: 2;margin-left:8px;}
  58. .lanse{color:#28A1FF;}
  59. .huise999{color:#999;}
  60. .rst_box_left_ov::-webkit-scrollbar{width:6px;height: 1px;}
  61. .rst_box_left_ov::-webkit-scrollbar-track{background-color: #CBCBCB;border-radius: 3px;}
  62. .rst_box_left_ov::-webkit-scrollbar-thumb{box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);border-radius: 3px;}
  63. .rst_box_right_boxs::-webkit-scrollbar{width:6px;height: 1px;}
  64. .rst_box_right_boxs::-webkit-scrollbar-track{background-color: #CBCBCB;border-radius: 3px;}
  65. .rst_box_right_boxs::-webkit-scrollbar-thumb{box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);border-radius: 3px;}
  66. .rst_box_left_ov{overflow: auto;height: 541px;margin-top:10px;}
  67. .rst_box_left_ov li .rst_box_b_left_time{height: 26px;line-height: 26px;padding:0 5px;}
  68. .rst_box_b_right_top{background: #fff;padding: 16px 25px;overflow: hidden;border-radius: 8px;}
  69. .isnbsp{display: none;}
  70. @media only screen and (max-width: 1750px) {
  71. .rst_box_b_left_input{width:23.5%; }
  72. }
  73. .rst_box_b_right *{box-sizing: border-box;}
  74. .rst_box_b_right_ico a{height: 28px;position: relative;}
  75. .rst_box_b_right_ico a img{position: absolute;top:0;left:0;right:0;bottom:0;margin:auto;height:70%;}
  76. .baise{color: #fff;}
  77. .rst_box_right_b_ul{box-sizing: border-box;}
  78. .rst_box_right_b_ul li{background: #fff;border-radius: 8px;overflow:hidden;margin-top:10px;height:91px;box-shadow: 0px 0px 4px 3px #f5f5f5;}
  79. .borleft{left:0;top:0;width:4px;height: 100%;}
  80. .height28{height: 28px;}
  81. .null_img{display: none;}
  82. .rst_box_left_ov::-webkit-scrollbar-track{background: none;}
  83. .rst_box_right_boxs::-webkit-scrollbar-track{background: none;}
  84. .rst_box_left_ov::-webkit-scrollbar-thumb{box-shadow:none}
  85. .rst_box_right_boxs::-webkit-scrollbar-thumb{box-shadow:none}
  86. .layui-tab-title .layui-this:after{
  87. width: 60%;
  88. height: 2px;
  89. border-radius: 3px;
  90. left: 50%;
  91. transform: translateX(-50%);
  92. }
  93. .mt20{
  94. margin-top: 20px;
  95. }
  96. .font18{
  97. font-size: 18px;
  98. }
  99. .pdtb18{
  100. padding-top: 9px;
  101. padding-bottom: 9px;
  102. }
  103. .flex-column {display: flex;flex-direction: row;}
  104. .flex-row {display: flex;}
  105. .flex-sub {flex:1;}
  106. .mt10 {margin-top: 0px;}
  107. @media (max-width: 1200px) {
  108. .flex-column {display: flex;flex-direction: column;}
  109. .flex-sub {flex:1;}
  110. .top10s{margin-top:10px;}
  111. .mt10 {margin-top: 10px;}
  112. .isnbsp{display: block;}
  113. }
  114. .rst_box_right_boxs{height: 607px;overflow: auto;}
  115. .rst_box_b_left_dls dd{height: 81px;}
  116. #start_date{
  117. position: relative;
  118. overflow: auto;
  119. }
  120. #end_date{
  121. position: relative;
  122. overflow: auto;
  123. }
  124. .layui-card .layui-tab-brief .layui-tab-title li.layui-this {
  125. color: #28A1FF;
  126. }
  127. .rst_box_right_boxs{padding:0 25px;}
  128. </style>
  129. <body>
  130. <div class="layui-fluid">
  131. <div class="layui-card">
  132. <div class="layui-tab layui-tab-brief">
  133. <ul class="layui-tab-title rst_box_top">
  134. <li class="layui-this font14">业绩任务</li>
  135. <li class="font14 layui-tjbtn">日常任务</li>
  136. </ul>
  137. <div class="layui-tab-content mdt20">
  138. <div class="layui-tab-item mdt20 layui-show">
  139. <div class="rst_box_m">
  140. <ul class="rst_box_m_ul">
  141. <li class="huise333">
  142. <p class="font24 Impact">{$data.all_count}</p>
  143. <p class="font12 mdt10">任务总量</p>
  144. </li>
  145. <li class="huise333">
  146. <p class="font24 Impact">{$data.ing_count}</p>
  147. <p class="font12 mdt10">任务进行中</p>
  148. </li>
  149. <li class="huise333">
  150. <p class="font24 Impact">{$data.wks_count}</p>
  151. <p class="font12 mdt10">任务未开始</p>
  152. </li>
  153. <li class="huise333">
  154. <p class="font24 Impact">{$data.pass_count}</p>
  155. <p class="font12 mdt10">任务已完成</p>
  156. </li>
  157. <li class="huise333">
  158. <p class="font24 Impact">{$data.no_count}</p>
  159. <p class="font12 mdt10">逾期任务</p>
  160. </li>
  161. <li class="huise333">
  162. <p class="font24 Impact">{$data.grawth}</p>
  163. <p class="font12 mdt10">任务完成率</p>
  164. </li>
  165. </ul>
  166. </div>
  167. <div class="rst_box_b mdt20 woverflow">
  168. <div class="rst_box_b_left wleft width40_ pdt25">
  169. <div class="width96_ wauto">
  170. <div class="woverflow lh28 mdl01_5">
  171. <p class="rst_box_b_left_X mdt01 wleft"></p>
  172. <p class="wleft font18 textb mdl10 ">完成记录</p>
  173. <p class="wright font12 rst_box_b_left_time huise999 pdtb02 pdlr10">最新动态时间:<span id="new_time"></span></p>
  174. </div>
  175. <div class="mt20 font14">
  176. <div class="flex-column">
  177. <div class="flex-sub flex-row">
  178. <div class="flex-sub layui-form-item wleft mdl01_5 width22_ rst_box_b_left_input_time">
  179. <div class="layui-input-block">
  180. <input type="text" name="start_time1" class="layui-input" required autocomplete="off" placeholder="开始时间" id="start_date">
  181. </div>
  182. </div>
  183. <p class="wleft lh38 mdlr01_">至</p>
  184. <div class="flex-sub layui-form-item wleft width22_ rst_box_b_left_input_time">
  185. <div class="layui-input-block">
  186. <input type="text" name="start_time2" class="layui-input" required autocomplete="off" placeholder="结束时间" id="end_date">
  187. </div>
  188. </div>
  189. </div>
  190. <div class="flex-sub flex-row top10s">
  191. <div class="flex-sub layui-form-item wleft bor0 mdl01_5 wpsr rst_box_b_left_input layui-form">
  192. <select name="designer_id" id='designer_id'>
  193. <option value="">请选择部门</option>
  194. {volist name="org" id="i"}
  195. <option value="{$i.id}">{$i.name}</option>
  196. {/volist}
  197. </select>
  198. </div>
  199. <p class="wleft lh38 mdlr01_ isnbsp">&nbsp;&nbsp;</p>
  200. <div class="flex-sub layui-form-item wleft bor0 mdl01_5 wpsr rst_box_b_left_input">
  201. <div class="layui-input-block">
  202. <input type="text" name="name" required lay-verify="required" placeholder="请输入关键字" autocomplete="off" class="layui-input" id="keyword">
  203. </div>
  204. <i class="fa fa-search searchIco wpsa ds" aria-hidden="true" id="search"></i>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="clear"></div>
  209. </div>
  210. <div class="rst_box_left_ov wpsr">
  211. <ul class="rst_box_b_left_ul conwolist width98_ wauto" id="con"></ul>
  212. <img class="wpsa null_img wpsauto" src="__STATIC__/img/data.png"/>
  213. <!--<div id="page_container"></div>-->
  214. </div>
  215. </div>
  216. </div>
  217. <div class="wright width59_ rst_box_b_right">
  218. <div class="woverflow rst_box_b_right_top">
  219. <div class="woverflow">
  220. <p class="rst_box_b_left_X mdt01 wleft"></p>
  221. <p class="wleft font18 textb mdl10" style="display:inline-block;line-height: 28px;">计划业绩</p>
  222. <a class="wright textb href lanse font14 addresults" style="display:inline-block;line-height: 28px;" lay-event="add"><span>+</span>添加</a>
  223. </div>
  224. </div>
  225. <div class="rst_box_right_boxs">
  226. <ul class="rst_box_right_b_ul" id="cons"></ul>
  227. <!--<div id="page_containers"></div>-->
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="layui-tab-item" style="height:90vh;">
  233. <iframe id="iframe02" src="" style="width: 100%;height:100%;" scrolling="0" frameborder="0"></iframe>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. </body>
  240. {/block} {block name="js"}
  241. <script>
  242. layui.config({
  243. base: '__LAYUI__/',
  244. urlbase: '/sys'
  245. }).extend({
  246. index: 'lib/index' //主入口模块
  247. }).use(['index', 'form','laydate','laypage','element'], function() {
  248. var $ = layui.$,
  249. form = layui.form,
  250. laydate = layui.laydate,
  251. laypage = layui.laypage,
  252. element = layui.element,
  253. form = layui.form;
  254. var counts=0;
  255. var countss=0;
  256. var htmlbox='';
  257. var htmlboxs='';
  258. //订单列表
  259. var page = 1;//当前页
  260. var limit = 10;
  261. //任务列表
  262. var pages = 1;//当前页
  263. var limits = 8;
  264. //日期范围
  265. laydate.render({
  266. elem: '#start_date'
  267. ,format: 'yyyy-MM-dd' //可任意组合
  268. ,trigger: 'click'
  269. });
  270. laydate.render({
  271. elem: '#end_date'
  272. ,format: 'yyyy-MM-dd' //可任意组合
  273. ,trigger: 'click'
  274. });
  275. for(let i=0;i<$('.rst_box_b_left_ul li').length;i++){
  276. $('.rst_box_b_left_ul li').eq(i).find('dd').last().find('.bor_xs').hide();
  277. }
  278. $('.rst_box_b_left_ul li').last().removeClass('mdb30');
  279. $('.layui-tjbtn').click(function(){
  280. $('#iframe02').attr('src','../daily_tasks/index.html');
  281. })
  282. $('.addresults').click(function(){
  283. layer.open({
  284. type: 2,
  285. title: ['创建业绩任务', 'color:#333333;background-color:#D8E6F1;'],
  286. content: '{:url("preformance_tasks/add")}',
  287. resize: false,
  288. area: ['800px', '550px'],
  289. scrollbar:false,
  290. yes: function(index, layero) {
  291. }
  292. });
  293. })
  294. //任务完成记录
  295. $('.rst_box_left_ov').scroll(function () {
  296. let st = $('.rst_box_left_ov').scrollTop();
  297. let ch = $('.rst_box_left_ov').height();
  298. let dh = $('.rst_box_b_left_ul').height();
  299. console.log(st+'------'+ch+'------'+Math.ceil(dh))
  300. console.log(Math.ceil(st)+Math.ceil(ch)-30)
  301. console.log(Math.ceil(st))
  302. if((Math.ceil(st)+ch-30) == dh){
  303. if(page<counts){
  304. console.log(page+'-----'+counts)
  305. page++;
  306. active.order_list(page);
  307. }else{
  308. layer.msg('已经没有数据了', {
  309. anim: 0
  310. , time: 2000
  311. });
  312. }
  313. }
  314. })
  315. $('.rst_box_right_boxs').scroll(function () {
  316. let st = $('.rst_box_right_boxs').scrollTop();
  317. let ch = $('.rst_box_right_boxs').height();
  318. let dh = $('.rst_box_right_b_ul').height();
  319. if((Math.ceil(st)+ch-10) == dh){
  320. if(pages<countss){
  321. pages++;
  322. active.tasks_list(pages);
  323. }else{
  324. layer.msg('已经没有数据了', {
  325. anim: 0
  326. , time: 2000
  327. });
  328. }
  329. }
  330. })
  331. var active = {
  332. order_list: function(page) {
  333. var designer_id = $('#designer_id').val();
  334. var keyword = $('#keyword').val();
  335. var start_date = $('#start_date').val();
  336. var end_date = $('#end_date').val();
  337. var layerIndex=layer.load(1);
  338. $.ajax({
  339. type: 'post',
  340. url: "{:url('preformanceTasks/orders')}?page="+page+'&limit='+limit,
  341. data: {org_id:designer_id, keyword:keyword,start_date:start_date,end_date:end_date},
  342. success: function(res) {
  343. if (page==1) {
  344. htmlbox = '';
  345. }
  346. $('#con').empty();
  347. if(res.code == 0) {
  348. layer.close(layerIndex);
  349. var data = res.data;
  350. counts=Math.ceil(res.count/10);
  351. if(data.length !== 0){
  352. $('.null_img').hide();
  353. var html = '';
  354. for (var i in data) {
  355. var key = i;
  356. var row = data[i];
  357. html += "<li class='woverflow mdb30'>";
  358. html += "<p class='font14 rst_box_b_left_time ids huise999 pdtb02 pdlr10'>"+i+"</p>";
  359. html += "<dl class='rst_box_b_left_dls'>";
  360. row.forEach(function(elem,index) {
  361. html += "<dd class='mdt15 wpsr'>";
  362. html += "<div class='wpsr wleft'>";
  363. html += "<div class='rst_box_b_left_yuan1 wpsr mdt36'>";
  364. html += "<div class='rst_box_b_left_yuan2'></div>";
  365. html += "</div>";
  366. html += "<span class='bor_xs wpsa'></span>";
  367. html += "</div>";
  368. html += "<div class='woverflow mdl20 mdt28 rst_box_b_left_tx wleft'>";
  369. html += "<img class='width100_ height100_' src='"+elem.img+"'/>";
  370. html += "</div>";
  371. html += "<div class='woverflow wright width85_'>";
  372. html += "<div class='woverflow lh28'>";
  373. html += "<p class='wleft font14'>"+elem.employee_name+"/"+elem.org_name+"</p>";
  374. html += "<p class='wright font14 rst_box_b_left_time huise999 pdlr10'>"+elem.time+"</p>";
  375. html += "</div>";
  376. html += "<p class='font14 lh30 huise999'><span class='lanse'>"+elem.type+"</span>: <span>“"+elem.customer_name+"”"+elem.show_money+"</span></p>";
  377. for (var i = 0; i < elem.tasks.length; i++) {
  378. html += "<p class='font14 mdt04 huise999'>"+elem.tasks[i]+"</p>";
  379. }
  380. html += "</div>";
  381. html += "<div class='clear'></div>";
  382. html += "</dd>";
  383. });
  384. html += "</dl>";
  385. html += "</li>";
  386. }
  387. $('#con').empty();
  388. htmlbox+=html;
  389. $('#con').html(htmlbox);
  390. active.page(res.count);
  391. $('#new_time').html(res.time);
  392. }else{
  393. $('#page_container').hide();
  394. $('.null_img').show();
  395. }
  396. } else {
  397. layer.msg(res.msg, {
  398. anim: 6
  399. });
  400. }
  401. }
  402. });
  403. },
  404. page:function(count){
  405. laypage.render({
  406. elem:'page_container',
  407. count:count,
  408. limit:limit,
  409. curr:page,
  410. jump:function(obj,first){
  411. //获取到当前的页数
  412. if(!first) {
  413. if ( page != obj.curr ) {
  414. page = obj.curr;
  415. active.order_list(page);
  416. }
  417. }
  418. }
  419. })
  420. },
  421. tasks_list: function(pages) {
  422. var layerIndex=layer.load(1);
  423. $.ajax({
  424. type: 'post',
  425. url: "{:url('preformanceTasks/tasks')}?page="+pages+'&limit='+limits,
  426. data: {},
  427. success: function(res) {
  428. if(res.code == 0) {
  429. layer.close(layerIndex);
  430. var data = res.data;
  431. countss=Math.ceil(res.count/6);
  432. var html = '';
  433. for (var i in data) {
  434. var key = i;
  435. var row = data[i];
  436. html += "<li class='wpsr pdtb18 rst_box_b_right_li_"+(i+1)+"'>";
  437. html += "<div class='width94_ wauto'>";
  438. html += "<p class='font16 textb'>"+row.title+"</p>";
  439. html += "<div class='woverflow lh28'>";
  440. html += "<p class='huise999 width25_ font12 wleft'>"+row.start_dates+"至"+row.end_dates+"</p>";
  441. if (row.is_deposit) {
  442. html += "<div class='wleft woverflow width16_ href statistical' data-id="+row.id+">";
  443. // html += "<img class='wleft' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/signs.png'/>";
  444. html += "<p class='wleft mdl02_ textlh1 lanse font16'>"+row.ok_deposit+"/"+row.deposit+"(单)</p>";
  445. } else {
  446. html += "<div class='wleft woverflow width16_ href' data-id="+row.id+">";
  447. //html += "<img class='wleft' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/signs.png'/>";
  448. html += "<p class='wlefts mdl02_s lanses font16s'>暂未设置</p>";
  449. }
  450. html += "</div>";
  451. if (row.is_money) {
  452. html += "<div class='wleft woverflow width16_ href statisticals moneys' data-id="+row.id+">";
  453. // html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
  454. html += "<p class='wleft mdl02_ lanse woverflow height28 font16 width78_'>"+row.ok_money+"/"+row.money+"(元)</p>";
  455. } else {
  456. html += "<div class='wleft woverflow width16_ href' data-id="+row.id+">";
  457. // html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
  458. html += "<p class='wleft mdl02_ lanses font16'>暂未设置</p>";
  459. }
  460. html += "</div>";
  461. if (row.is_credit) {
  462. html += "<div class='wleft woverflow width16_ href statisticals moneys' data-id="+row.id+">";
  463. //html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
  464. html += "<p class='wleft mdl02_ lanse woverflow height28 font16 width78_'>"+row.ok_credit+"/"+row.credit+"(学分)</p>";
  465. } else {
  466. html += "<div class='wleft woverflow width16_ href' data-id="+row.id+">";
  467. //html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
  468. html += "<p class='wleft mdl02_ lanses font16'>暂未设置</p>";
  469. }
  470. html += "</div>";
  471. html += "<div class='wleft woverflow width24_ rst_box_b_right_ico'>";
  472. html += "<a class='ds width25_ details href wleft' data-id="+row.id+">";
  473. html += "<img class='wauto' src='__STATIC__/img/views.png'/>";
  474. html += "</a>";
  475. html += "<a class='ds width25_ href wleft edit' data-id="+row.id+">";
  476. html += "<img class='wauto' src='__STATIC__/img/edits.png'/>";
  477. html += "</a>";
  478. html += "<a class='ds width25_ href wleft'>";
  479. html += "<img data-id="+row.id+" class='wauto assign_org' src='__STATIC__/img/users.png'/>";
  480. html += "</a>";
  481. html += "<a class='ds width25_ href wleft'>";
  482. html += "<img class='wauto deltasks' data-id="+row.id+" src='__STATIC__/img/dels.png'/>";
  483. html += "</a>";
  484. html += "</div>";
  485. html += "</div>";
  486. html += "<p class='font12 pdlr10 ids pdtb02 borrds04 baise' style='"+row.color+"'>"+row.state+"</p>";
  487. html += "</div><div class='borleft wpsa' style='"+row.color+"'></div>";
  488. html += "</li>";
  489. }
  490. $('#cons').empty();
  491. htmlboxs+=html;
  492. $('#cons').html(htmlboxs);
  493. active.pages(res.count);
  494. $('#new_time').html(res.time);
  495. } else {
  496. layer.msg(res.msg, {
  497. anim: 6
  498. });
  499. }
  500. }
  501. });
  502. },
  503. pages:function(counts){
  504. laypage.render({
  505. elem:'page_containers',
  506. count:counts,
  507. limit:limits,
  508. curr:pages,
  509. jump:function(obj,first){
  510. // console.log(obj)
  511. //获取到当前的页数
  512. if(!first) {
  513. if ( pages != obj.curr ) {
  514. pages = obj.curr;
  515. active.tasks_list(pages);
  516. }
  517. }
  518. }
  519. })
  520. }
  521. };
  522. //交定排行
  523. $(document).on("click",'.statistical',function(){
  524. var id = $(this).data('id');
  525. layer.open({
  526. type: 2,
  527. title: ['定金排行', 'color:#333333;background-color:#D8E6F1;'],
  528. content: '{:url("preformance_tasks/deposit")}?id='+id,
  529. resize: false,
  530. area: ['80%', '80%'],
  531. scrollbar:false,
  532. yes: function(index, layero) {
  533. }
  534. });
  535. })
  536. //签单排行
  537. $(document).on("click",'.moneys',function(){
  538. var id = $(this).data('id');
  539. layer.open({
  540. type: 2,
  541. title: ['合同排行', 'color:#333333;background-color:#D8E6F1;'],
  542. content: '{:url("preformance_tasks/money")}?id='+id,
  543. resize: false,
  544. area: ['80%', '80%'],
  545. scrollbar:false,
  546. yes: function(index, layero) {
  547. }
  548. });
  549. })
  550. //编辑任务
  551. $(document).on("click",'.edit',function(){
  552. var id = $(this).data('id');
  553. layer.open({
  554. type: 2,
  555. title: ['编辑', 'color:#333333;background-color:#D8E6F1;'],
  556. content: '{:url("preformance_tasks/edit")}?id='+id,
  557. resize: false,
  558. area: ['800px', '550px'],
  559. scrollbar:false,
  560. yes: function(index, layero) {
  561. }
  562. });
  563. })
  564. //指派详情列表页
  565. $(document).on("click",'.details',function(){
  566. var id = $(this).data('id');
  567. window.location.replace('{:url("preformance_tasks/details")}?id='+id);
  568. })
  569. active.order_list(page);
  570. active.tasks_list(pages);
  571. //指派弹框
  572. $(document).on('click','#cons li .assign_org',function(e){
  573. var id = $(this).data('id');
  574. layer.open({
  575. type: 2,
  576. title: ['指派部门', 'color:#333333;background-color:#D8E6F1;'],
  577. content: '{:url("preformanceTasks/assign")}?id='+id,
  578. resize: false,
  579. area: ['80%', '90%'],
  580. scrollbar:false,
  581. yes: function(index, layero) {
  582. }
  583. });
  584. })
  585. //删除任务
  586. $(document).on('click','#cons li .deltasks',function(e){
  587. var id = $(this).data('id');
  588. layer.confirm('确定删除此任务?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function (index) {
  589. $.ajax({
  590. type: 'post',
  591. url: "{:url('preformanceTasks/del_tasks')}",
  592. data: {id: id},
  593. success: function (res) {
  594. if (res.code == 0) {
  595. layer.msg(res.msg, {
  596. anim: 0,time: 1000
  597. }, function () {
  598. active.tasks_list(pages);
  599. });
  600. } else {
  601. layer.msg(res.msg, {
  602. anim: 6,time: 1000
  603. });
  604. }
  605. }
  606. });
  607. });
  608. })
  609. //搜索订单
  610. $('#search').click(function(){
  611. var org_id = $('#designer_id').val();
  612. var keyword = $('#keyword').val();
  613. var start = $('#start_date').val();
  614. var end = $('#end_date').val();
  615. active.order_list(1);
  616. })
  617. })
  618. </script>
  619. {/block}