123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645 |
- {extend name="public/layout"/} {block name="title"}在施工地{/block} {block name="body"}
- <link rel="stylesheet" href="__STATIC__/css/csspc.css">
- <link rel="stylesheet" href="__STATIC__/css/font.css">
- <style>
- *{box-sizing: initial;}
- .font12{font-size: 12px !important;}
- .font14{font-size: 14px !important;}
- .font16{font-size: 16px !important;}
- html{min-width:1420px;margin:0 auto;width:100%;}
- body{background: #EEEEEE;height: 100%;width:100%;color:#333;}
- .layui-fluid {
- display: block;
- box-shadow: 0 0 4px 0 #B6CADE;
- border-radius: 5px;
- margin: 15px;
- background-color: #ffffff;
- padding: 10px 30px;
- }
- .layui-card{overflow: hidden;background: #fff;}
- .rst_box_top{
- background: #fff;
- padding:9px 25px 1px;
- border-radius: 8px;
- }
- .layui-tab-title .layui-this:after {
- width: 50px !important;
- }
- .mdt20{margin-top:10px;}
- .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;}
- .rst_box_m{
- border-radius: 8px;background: #fff;overflow: hidden;
- padding: 28px 0;
- box-shadow: 0px 0px 4px 3px #f5f5f5;
- width: 98%;
- margin:30px auto 0;
- }
- .rst_box_m_ul{overflow: hidden;}
- .rst_box_m_ul li{float:left;width:16.66%;text-align: center;}
- .Impact{font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;}
- .huise333{color:#333;}
- .layui-card .layui-tab-brief .layui-tab-content{padding: 0;}
- .rst_box_b_left{background: #fff;border-radius: 8px;overflow: hidden;}
- .rst_box_b_left_X{width:4px;height: 24px;background: #28A1FF;border-radius: 2px;overflow: hidden;position: relative;top: 2px;}
- .rst_box_b_left_time{background: #F3F3F3;border-radius: 4px;}
- .searchIco{right:5%;font-size:16px;color:#28A1FF;top:0; text-align: center;line-height: 38px;}
- .rst_box_b_left_input{width:24%;border:1px solid #ECECEC;}
- .rst_box_b_left_input select{width:100%;height:38px;}
- .layui-input-block{margin:0;}
- .layui-form-item{margin-bottom:0;clear:initial;}
- input{font-size: 14px !important;}
- .mdl01_5{margin-left:1.5%;}
- .layui-form-label{width:auto;padding:5px 2px;}
- .huise999{color:#999 !important;}
- .rst_box_b_left_yuan1{background: #7EC6FF;border-radius: 50%;padding:2px;z-index: 5;}
- .rst_box_b_left_yuan2{background: #28A1FF;width:12px;height: 12px;border-radius: 50%;}
- .rst_box_b_left_tx{border-radius: 50%;width:30px;height: 30px;}
- .rst_box_b_left_ul .bor_xs{height: 90px;border-left:1px dashed #CCCCCC;z-index: 2;margin-left:8px;}
- .lanse{color:#28A1FF;}
- .huise999{color:#999;}
- .rst_box_left_ov::-webkit-scrollbar{width:6px;height: 1px;}
- .rst_box_left_ov::-webkit-scrollbar-track{background-color: #CBCBCB;border-radius: 3px;}
- .rst_box_left_ov::-webkit-scrollbar-thumb{box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);border-radius: 3px;}
- .rst_box_right_boxs::-webkit-scrollbar{width:6px;height: 1px;}
- .rst_box_right_boxs::-webkit-scrollbar-track{background-color: #CBCBCB;border-radius: 3px;}
- .rst_box_right_boxs::-webkit-scrollbar-thumb{box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);border-radius: 3px;}
- .rst_box_left_ov{overflow: auto;height: 541px;margin-top:10px;}
- .rst_box_left_ov li .rst_box_b_left_time{height: 26px;line-height: 26px;padding:0 5px;}
- .rst_box_b_right_top{background: #fff;padding: 16px 25px;overflow: hidden;border-radius: 8px;}
- .isnbsp{display: none;}
- @media only screen and (max-width: 1750px) {
- .rst_box_b_left_input{width:23.5%; }
-
- }
- .rst_box_b_right *{box-sizing: border-box;}
- .rst_box_b_right_ico a{height: 28px;position: relative;}
- .rst_box_b_right_ico a img{position: absolute;top:0;left:0;right:0;bottom:0;margin:auto;height:70%;}
- .baise{color: #fff;}
- .rst_box_right_b_ul{box-sizing: border-box;}
- .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;}
- .borleft{left:0;top:0;width:4px;height: 100%;}
- .height28{height: 28px;}
- .null_img{display: none;}
- .rst_box_left_ov::-webkit-scrollbar-track{background: none;}
- .rst_box_right_boxs::-webkit-scrollbar-track{background: none;}
- .rst_box_left_ov::-webkit-scrollbar-thumb{box-shadow:none}
- .rst_box_right_boxs::-webkit-scrollbar-thumb{box-shadow:none}
- .layui-tab-title .layui-this:after{
- width: 60%;
- height: 2px;
- border-radius: 3px;
- left: 50%;
- transform: translateX(-50%);
- }
- .mt20{
- margin-top: 20px;
- }
- .font18{
- font-size: 18px;
- }
- .pdtb18{
- padding-top: 9px;
- padding-bottom: 9px;
- }
- .flex-column {display: flex;flex-direction: row;}
- .flex-row {display: flex;}
- .flex-sub {flex:1;}
- .mt10 {margin-top: 0px;}
-
- @media (max-width: 1200px) {
- .flex-column {display: flex;flex-direction: column;}
- .flex-sub {flex:1;}
- .top10s{margin-top:10px;}
- .mt10 {margin-top: 10px;}
- .isnbsp{display: block;}
- }
- .rst_box_right_boxs{height: 607px;overflow: auto;}
- .rst_box_b_left_dls dd{height: 81px;}
- #start_date{
- position: relative;
- overflow: auto;
- }
- #end_date{
- position: relative;
- overflow: auto;
- }
- .layui-card .layui-tab-brief .layui-tab-title li.layui-this {
- color: #28A1FF;
- }
- .rst_box_right_boxs{padding:0 25px;}
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-tab layui-tab-brief">
- <ul class="layui-tab-title rst_box_top">
- <li class="layui-this font14">业绩任务</li>
- <li class="font14 layui-tjbtn">日常任务</li>
- </ul>
- <div class="layui-tab-content mdt20">
- <div class="layui-tab-item mdt20 layui-show">
- <div class="rst_box_m">
- <ul class="rst_box_m_ul">
- <li class="huise333">
- <p class="font24 Impact">{$data.all_count}</p>
- <p class="font12 mdt10">任务总量</p>
- </li>
- <li class="huise333">
- <p class="font24 Impact">{$data.ing_count}</p>
- <p class="font12 mdt10">任务进行中</p>
- </li>
- <li class="huise333">
- <p class="font24 Impact">{$data.wks_count}</p>
- <p class="font12 mdt10">任务未开始</p>
- </li>
- <li class="huise333">
- <p class="font24 Impact">{$data.pass_count}</p>
- <p class="font12 mdt10">任务已完成</p>
- </li>
- <li class="huise333">
- <p class="font24 Impact">{$data.no_count}</p>
- <p class="font12 mdt10">逾期任务</p>
- </li>
- <li class="huise333">
- <p class="font24 Impact">{$data.grawth}</p>
- <p class="font12 mdt10">任务完成率</p>
- </li>
- </ul>
- </div>
- <div class="rst_box_b mdt20 woverflow">
- <div class="rst_box_b_left wleft width40_ pdt25">
- <div class="width96_ wauto">
- <div class="woverflow lh28 mdl01_5">
- <p class="rst_box_b_left_X mdt01 wleft"></p>
- <p class="wleft font18 textb mdl10 ">完成记录</p>
- <p class="wright font12 rst_box_b_left_time huise999 pdtb02 pdlr10">最新动态时间:<span id="new_time"></span></p>
- </div>
- <div class="mt20 font14">
- <div class="flex-column">
- <div class="flex-sub flex-row">
- <div class="flex-sub layui-form-item wleft mdl01_5 width22_ rst_box_b_left_input_time">
- <div class="layui-input-block">
- <input type="text" name="start_time1" class="layui-input" required autocomplete="off" placeholder="开始时间" id="start_date">
- </div>
- </div>
- <p class="wleft lh38 mdlr01_">至</p>
- <div class="flex-sub layui-form-item wleft width22_ rst_box_b_left_input_time">
- <div class="layui-input-block">
- <input type="text" name="start_time2" class="layui-input" required autocomplete="off" placeholder="结束时间" id="end_date">
- </div>
- </div>
- </div>
- <div class="flex-sub flex-row top10s">
- <div class="flex-sub layui-form-item wleft bor0 mdl01_5 wpsr rst_box_b_left_input layui-form">
- <select name="designer_id" id='designer_id'>
- <option value="">请选择部门</option>
- {volist name="org" id="i"}
- <option value="{$i.id}">{$i.name}</option>
- {/volist}
- </select>
- </div>
- <p class="wleft lh38 mdlr01_ isnbsp"> </p>
- <div class="flex-sub layui-form-item wleft bor0 mdl01_5 wpsr rst_box_b_left_input">
- <div class="layui-input-block">
- <input type="text" name="name" required lay-verify="required" placeholder="请输入关键字" autocomplete="off" class="layui-input" id="keyword">
- </div>
- <i class="fa fa-search searchIco wpsa ds" aria-hidden="true" id="search"></i>
- </div>
- </div>
- </div>
- <div class="clear"></div>
- </div>
-
- <div class="rst_box_left_ov wpsr">
- <ul class="rst_box_b_left_ul conwolist width98_ wauto" id="con"></ul>
- <img class="wpsa null_img wpsauto" src="__STATIC__/img/data.png"/>
- <!--<div id="page_container"></div>-->
- </div>
- </div>
- </div>
- <div class="wright width59_ rst_box_b_right">
- <div class="woverflow rst_box_b_right_top">
- <div class="woverflow">
- <p class="rst_box_b_left_X mdt01 wleft"></p>
- <p class="wleft font18 textb mdl10" style="display:inline-block;line-height: 28px;">计划业绩</p>
- <a class="wright textb href lanse font14 addresults" style="display:inline-block;line-height: 28px;" lay-event="add"><span>+</span>添加</a>
- </div>
- </div>
- <div class="rst_box_right_boxs">
- <ul class="rst_box_right_b_ul" id="cons"></ul>
- <!--<div id="page_containers"></div>-->
- </div>
- </div>
- </div>
- </div>
- <div class="layui-tab-item" style="height:90vh;">
- <iframe id="iframe02" src="" style="width: 100%;height:100%;" scrolling="0" frameborder="0"></iframe>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- {/block} {block name="js"}
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'form','laydate','laypage','element'], function() {
- var $ = layui.$,
- form = layui.form,
- laydate = layui.laydate,
- laypage = layui.laypage,
- element = layui.element,
- form = layui.form;
- var counts=0;
- var countss=0;
- var htmlbox='';
- var htmlboxs='';
- //订单列表
- var page = 1;//当前页
- var limit = 10;
- //任务列表
- var pages = 1;//当前页
- var limits = 8;
- //日期范围
- laydate.render({
- elem: '#start_date'
- ,format: 'yyyy-MM-dd' //可任意组合
- ,trigger: 'click'
- });
- laydate.render({
- elem: '#end_date'
- ,format: 'yyyy-MM-dd' //可任意组合
- ,trigger: 'click'
- });
- for(let i=0;i<$('.rst_box_b_left_ul li').length;i++){
- $('.rst_box_b_left_ul li').eq(i).find('dd').last().find('.bor_xs').hide();
- }
- $('.rst_box_b_left_ul li').last().removeClass('mdb30');
-
- $('.layui-tjbtn').click(function(){
- $('#iframe02').attr('src','../daily_tasks/index.html');
- })
- $('.addresults').click(function(){
- layer.open({
- type: 2,
- title: ['创建业绩任务', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("preformance_tasks/add")}',
- resize: false,
- area: ['800px', '550px'],
- scrollbar:false,
- yes: function(index, layero) {
- }
- });
- })
- //任务完成记录
-
- $('.rst_box_left_ov').scroll(function () {
- let st = $('.rst_box_left_ov').scrollTop();
- let ch = $('.rst_box_left_ov').height();
- let dh = $('.rst_box_b_left_ul').height();
- console.log(st+'------'+ch+'------'+Math.ceil(dh))
- console.log(Math.ceil(st)+Math.ceil(ch)-30)
- console.log(Math.ceil(st))
- if((Math.ceil(st)+ch-30) == dh){
- if(page<counts){
- console.log(page+'-----'+counts)
- page++;
- active.order_list(page);
- }else{
- layer.msg('已经没有数据了', {
- anim: 0
- , time: 2000
- });
- }
- }
- })
- $('.rst_box_right_boxs').scroll(function () {
- let st = $('.rst_box_right_boxs').scrollTop();
- let ch = $('.rst_box_right_boxs').height();
- let dh = $('.rst_box_right_b_ul').height();
- if((Math.ceil(st)+ch-10) == dh){
- if(pages<countss){
- pages++;
- active.tasks_list(pages);
- }else{
- layer.msg('已经没有数据了', {
- anim: 0
- , time: 2000
- });
- }
- }
- })
- var active = {
- order_list: function(page) {
- var designer_id = $('#designer_id').val();
- var keyword = $('#keyword').val();
- var start_date = $('#start_date').val();
- var end_date = $('#end_date').val();
- var layerIndex=layer.load(1);
- $.ajax({
- type: 'post',
- url: "{:url('preformanceTasks/orders')}?page="+page+'&limit='+limit,
- data: {org_id:designer_id, keyword:keyword,start_date:start_date,end_date:end_date},
- success: function(res) {
- if (page==1) {
- htmlbox = '';
- }
- $('#con').empty();
- if(res.code == 0) {
- layer.close(layerIndex);
- var data = res.data;
- counts=Math.ceil(res.count/10);
- if(data.length !== 0){
- $('.null_img').hide();
- var html = '';
- for (var i in data) {
- var key = i;
- var row = data[i];
- html += "<li class='woverflow mdb30'>";
- html += "<p class='font14 rst_box_b_left_time ids huise999 pdtb02 pdlr10'>"+i+"</p>";
- html += "<dl class='rst_box_b_left_dls'>";
- row.forEach(function(elem,index) {
- html += "<dd class='mdt15 wpsr'>";
- html += "<div class='wpsr wleft'>";
- html += "<div class='rst_box_b_left_yuan1 wpsr mdt36'>";
- html += "<div class='rst_box_b_left_yuan2'></div>";
- html += "</div>";
- html += "<span class='bor_xs wpsa'></span>";
- html += "</div>";
- html += "<div class='woverflow mdl20 mdt28 rst_box_b_left_tx wleft'>";
- html += "<img class='width100_ height100_' src='"+elem.img+"'/>";
- html += "</div>";
- html += "<div class='woverflow wright width85_'>";
- html += "<div class='woverflow lh28'>";
- html += "<p class='wleft font14'>"+elem.employee_name+"/"+elem.org_name+"</p>";
- html += "<p class='wright font14 rst_box_b_left_time huise999 pdlr10'>"+elem.time+"</p>";
- html += "</div>";
- html += "<p class='font14 lh30 huise999'><span class='lanse'>"+elem.type+"</span>: <span>“"+elem.customer_name+"”"+elem.show_money+"</span></p>";
- for (var i = 0; i < elem.tasks.length; i++) {
- html += "<p class='font14 mdt04 huise999'>"+elem.tasks[i]+"</p>";
- }
- html += "</div>";
- html += "<div class='clear'></div>";
- html += "</dd>";
- });
- html += "</dl>";
- html += "</li>";
- }
- $('#con').empty();
- htmlbox+=html;
- $('#con').html(htmlbox);
- active.page(res.count);
- $('#new_time').html(res.time);
- }else{
- $('#page_container').hide();
- $('.null_img').show();
- }
-
- } else {
- layer.msg(res.msg, {
- anim: 6
- });
- }
- }
- });
- },
- page:function(count){
- laypage.render({
- elem:'page_container',
- count:count,
- limit:limit,
- curr:page,
- jump:function(obj,first){
- //获取到当前的页数
- if(!first) {
- if ( page != obj.curr ) {
- page = obj.curr;
- active.order_list(page);
- }
- }
- }
- })
- },
- tasks_list: function(pages) {
- var layerIndex=layer.load(1);
- $.ajax({
- type: 'post',
- url: "{:url('preformanceTasks/tasks')}?page="+pages+'&limit='+limits,
- data: {},
- success: function(res) {
- if(res.code == 0) {
- layer.close(layerIndex);
- var data = res.data;
- countss=Math.ceil(res.count/6);
- var html = '';
- for (var i in data) {
- var key = i;
- var row = data[i];
- html += "<li class='wpsr pdtb18 rst_box_b_right_li_"+(i+1)+"'>";
- html += "<div class='width94_ wauto'>";
- html += "<p class='font16 textb'>"+row.title+"</p>";
- html += "<div class='woverflow lh28'>";
- html += "<p class='huise999 width25_ font12 wleft'>"+row.start_dates+"至"+row.end_dates+"</p>";
- if (row.is_deposit) {
- html += "<div class='wleft woverflow width16_ href statistical' data-id="+row.id+">";
- // html += "<img class='wleft' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/signs.png'/>";
- html += "<p class='wleft mdl02_ textlh1 lanse font16'>"+row.ok_deposit+"/"+row.deposit+"(单)</p>";
- } else {
- html += "<div class='wleft woverflow width16_ href' data-id="+row.id+">";
- //html += "<img class='wleft' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/signs.png'/>";
- html += "<p class='wlefts mdl02_s lanses font16s'>暂未设置</p>";
- }
- html += "</div>";
- if (row.is_money) {
- html += "<div class='wleft woverflow width16_ href statisticals moneys' data-id="+row.id+">";
- // html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
- html += "<p class='wleft mdl02_ lanse woverflow height28 font16 width78_'>"+row.ok_money+"/"+row.money+"(元)</p>";
- } else {
- html += "<div class='wleft woverflow width16_ href' data-id="+row.id+">";
- // html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
- html += "<p class='wleft mdl02_ lanses font16'>暂未设置</p>";
- }
- html += "</div>";
- if (row.is_credit) {
- html += "<div class='wleft woverflow width16_ href statisticals moneys' data-id="+row.id+">";
- //html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
- html += "<p class='wleft mdl02_ lanse woverflow height28 font16 width78_'>"+row.ok_credit+"/"+row.credit+"(学分)</p>";
- } else {
- html += "<div class='wleft woverflow width16_ href' data-id="+row.id+">";
- //html += "<img class='wleft ' style='height: 24px;vertical-align: middle;' src='__STATIC__/img/moneys.png'/>";
- html += "<p class='wleft mdl02_ lanses font16'>暂未设置</p>";
- }
- html += "</div>";
- html += "<div class='wleft woverflow width24_ rst_box_b_right_ico'>";
- html += "<a class='ds width25_ details href wleft' data-id="+row.id+">";
- html += "<img class='wauto' src='__STATIC__/img/views.png'/>";
- html += "</a>";
- html += "<a class='ds width25_ href wleft edit' data-id="+row.id+">";
- html += "<img class='wauto' src='__STATIC__/img/edits.png'/>";
- html += "</a>";
- html += "<a class='ds width25_ href wleft'>";
- html += "<img data-id="+row.id+" class='wauto assign_org' src='__STATIC__/img/users.png'/>";
- html += "</a>";
- html += "<a class='ds width25_ href wleft'>";
- html += "<img class='wauto deltasks' data-id="+row.id+" src='__STATIC__/img/dels.png'/>";
- html += "</a>";
- html += "</div>";
- html += "</div>";
- html += "<p class='font12 pdlr10 ids pdtb02 borrds04 baise' style='"+row.color+"'>"+row.state+"</p>";
- html += "</div><div class='borleft wpsa' style='"+row.color+"'></div>";
- html += "</li>";
- }
- $('#cons').empty();
- htmlboxs+=html;
- $('#cons').html(htmlboxs);
- active.pages(res.count);
- $('#new_time').html(res.time);
- } else {
- layer.msg(res.msg, {
- anim: 6
- });
- }
- }
- });
- },
- pages:function(counts){
- laypage.render({
- elem:'page_containers',
- count:counts,
- limit:limits,
- curr:pages,
- jump:function(obj,first){
- // console.log(obj)
- //获取到当前的页数
- if(!first) {
- if ( pages != obj.curr ) {
- pages = obj.curr;
- active.tasks_list(pages);
- }
- }
- }
- })
- }
-
- };
- //交定排行
- $(document).on("click",'.statistical',function(){
- var id = $(this).data('id');
- layer.open({
- type: 2,
- title: ['定金排行', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("preformance_tasks/deposit")}?id='+id,
- resize: false,
- area: ['80%', '80%'],
- scrollbar:false,
- yes: function(index, layero) {
- }
- });
- })
- //签单排行
- $(document).on("click",'.moneys',function(){
- var id = $(this).data('id');
- layer.open({
- type: 2,
- title: ['合同排行', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("preformance_tasks/money")}?id='+id,
- resize: false,
- area: ['80%', '80%'],
- scrollbar:false,
- yes: function(index, layero) {
- }
- });
- })
- //编辑任务
- $(document).on("click",'.edit',function(){
- var id = $(this).data('id');
- layer.open({
- type: 2,
- title: ['编辑', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("preformance_tasks/edit")}?id='+id,
- resize: false,
- area: ['800px', '550px'],
- scrollbar:false,
- yes: function(index, layero) {
- }
- });
- })
- //指派详情列表页
- $(document).on("click",'.details',function(){
- var id = $(this).data('id');
- window.location.replace('{:url("preformance_tasks/details")}?id='+id);
- })
- active.order_list(page);
- active.tasks_list(pages);
- //指派弹框
- $(document).on('click','#cons li .assign_org',function(e){
- var id = $(this).data('id');
- layer.open({
- type: 2,
- title: ['指派部门', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("preformanceTasks/assign")}?id='+id,
- resize: false,
- area: ['80%', '90%'],
- scrollbar:false,
- yes: function(index, layero) {
- }
- });
- })
- //删除任务
- $(document).on('click','#cons li .deltasks',function(e){
- var id = $(this).data('id');
- layer.confirm('确定删除此任务?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function (index) {
- $.ajax({
- type: 'post',
- url: "{:url('preformanceTasks/del_tasks')}",
- data: {id: id},
- success: function (res) {
- if (res.code == 0) {
- layer.msg(res.msg, {
- anim: 0,time: 1000
- }, function () {
- active.tasks_list(pages);
- });
- } else {
- layer.msg(res.msg, {
- anim: 6,time: 1000
- });
- }
- }
- });
- });
- })
- //搜索订单
- $('#search').click(function(){
- var org_id = $('#designer_id').val();
- var keyword = $('#keyword').val();
- var start = $('#start_date').val();
- var end = $('#end_date').val();
- active.order_list(1);
- })
- })
- </script>
- {/block}
|