Selaa lähdekoodia

分页、多选、图表bug修复。
区分单点与系统用户的版本!

gzjzss 7 vuotta sitten
vanhempi
commit
a7b4f763d9

+ 3 - 2
application/controllers/Setting.php

@@ -80,7 +80,8 @@ class Setting extends MY_controller
             if ($setting['is_email']) {
                 $this->load->library('mailer');
                 $this->mailer->set_config($setting);
-                if ($this->mailer->send_email($setting['tester'], "邮件发送测试!", "邮件发送测试!如果收到这封邮件说明的邮箱配置已经成功!")) {
+                $resp = $this->mailer->send_email($setting['tester'], "邮件发送测试!", "邮件发送测试!如果收到这封邮件说明的邮箱配置已经成功!");
+                if ($resp['code'] == "OK") {
                     $msg .= "邮件发送成功!";
                 } else {
                     $msg .= "邮件发送失败!请检查配置!";
@@ -101,7 +102,7 @@ class Setting extends MY_controller
                     if($resp['Code'] == 'OK'){
                         $msg .= "短信发送成功!如未收到短信请检查配置!";
                     }else{
-                        $msg .= "短信发送失败!".$resp['Code'] ;
+                        $msg .= "短信发送失败!".$resp['Message'] ;
                     }
                 }
             } else {

+ 50 - 7
application/controllers/Workorder.php

@@ -325,8 +325,18 @@ class Workorder extends MY_Controller
                         $data['end_time'] = "";
                         if ($this->workorder_model->insert_workorder($data)) {
                             $this->update_warning_status($ids);
-                            $this->notices->create_workorder($data);
-                            $this->response(array("msg" => "工单生成成功!", "icon" => 1));
+                            $resp = $this->notices->create_workorder($data);
+                            $msg = "工单生成成功!";
+                            $icon = 1;
+                            if($resp['sms_code'] != 'OK'){
+                                $icon = 0;
+                                $msg .= "短信发送失败!错误信息:".$resp['sms_msg'];
+                            }
+                            if($resp['email_code'] != 'OK'){
+                                $icon = 0;
+                                $msg .= "邮件发送失败!错误信息:".$resp['email_msg'];
+                            }
+                            $this->response(array("msg" => $msg, "icon" => $icon));
                         } else {
                             $this->response(array("msg" => "工单生成失败!请刷新后重试。", "icon" => 2));
                         }
@@ -459,10 +469,18 @@ class Workorder extends MY_Controller
                 }
                 $wheres = array('warning_id' => array('$in' => $ids));
                 $this->warning_model->set_val("status", $wheres, "40");
-                $this->notices->finish_workorder($workorder_info);
+                $resp = $this->notices->finish_workorder($workorder_info);
                 $this->workorder_model->update_workorder($workorder_info);
                 $msg['msg'] = "结束工单操作成功!";
                 $msg['icon'] = 1;
+                if($resp['sms_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "短信发送失败!错误信息:".$resp['sms_msg'];
+                }
+                if($resp['email_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "邮件发送失败!错误信息:".$resp['email_msg'];
+                }
             } else {
                 $msg['msg'] = "工单不存在或者已经被删除!";
                 $msg['icon'] = 2;
@@ -492,10 +510,18 @@ class Workorder extends MY_Controller
                     $workorder_info['remark_list'][] = $remarks;
                 }
                 $workorder_info['status'] = "40";
-                $this->notices->reject_workorder($workorder_info, $remarks);
+                $resp = $this->notices->reject_workorder($workorder_info, $remarks);
                 $this->workorder_model->update_workorder($workorder_info);
                 $msg['msg'] = "驳回工单操作成功!";
                 $msg['icon'] = 1;
+                if($resp['sms_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "短信发送失败!错误信息:".$resp['sms_msg'];
+                }
+                if($resp['email_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "邮件发送失败!错误信息:".$resp['email_msg'];
+                }
             } else {
                 $msg['msg'] = "工单不存在或者已经被删除!";
                 $msg['icon'] = 2;
@@ -525,10 +551,18 @@ class Workorder extends MY_Controller
                     $workorder_info['remark_list'][] = $remarks;
                 }
                 $workorder_info['status'] = "20";
-                $this->notices->sign_workorder($workorder_info, $remarks);
+                $resp = $this->notices->sign_workorder($workorder_info, $remarks);
                 $this->workorder_model->update_workorder($workorder_info);
                 $msg['msg'] = "签收工单操作成功!";
                 $msg['icon'] = 1;
+                if($resp['sms_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "短信发送失败!错误信息:".$resp['sms_msg'];
+                }
+                if($resp['email_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "邮件发送失败!错误信息:".$resp['email_msg'];
+                }
             } else {
                 $msg['msg'] = "工单不存在或者已经被删除!";
                 $msg['icon'] = 2;
@@ -560,14 +594,23 @@ class Workorder extends MY_Controller
                     $workorder_info['remark_list'][] = $remarks;
                 }
                 $workorder_info['status'] = "30";
+                $resp = array();
                 if ($action == "check") {
-                    $this->notices->check_workorder($workorder_info, $remarks);
+                    $resp = $this->notices->check_workorder($workorder_info, $remarks);
                 } elseif ($action == "doit") {
-                    $this->notices->doit_workorder($workorder_info, $remarks);
+                    $resp = $this->notices->doit_workorder($workorder_info, $remarks);
                 }
                 $this->workorder_model->update_workorder($workorder_info);
                 $msg['msg'] = "工单处理完成等待复核!";
                 $msg['icon'] = 1;
+                if($resp['sms_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "短信发送失败!错误信息:".$resp['sms_msg'];
+                }
+                if($resp['email_code'] != 'OK'){
+                    $msg['icon'] = 0;
+                    $msg['msg'] .= "邮件发送失败!错误信息:".$resp['email_msg'];
+                }
             } else {
                 $msg['msg'] = "工单不存在或者已经被删除!";
                 $msg['icon'] = 2;

+ 1 - 1
application/core/MY_Controller.php

@@ -169,7 +169,7 @@ class Public_Controller extends CI_Controller
         $config['next_tag_close'] = '</li>';
         $config['num_tag_open'] = '<li>';
         $config['num_tag_close'] = '</li>';
-        $config['cur_tag_open'] = '<li class="active"><a href="#">';
+        $config['cur_tag_open'] = '<li class="active"><a href="javascript:;">';
         $config['cur_tag_close'] = '</a></li>';
         $config ['first_link'] = '«';
         $config['first_tag_open'] = '<li>';

+ 7 - 3
application/libraries/Aliyunsms.php

@@ -75,10 +75,14 @@ class Aliyunsms
             // 可选,设置模板参数, 假如模板中存在变量需要替换则为必填项
             $request->setTemplateParam(json_encode($content), JSON_UNESCAPED_UNICODE);
             // 发起访问请求
-            $acsResponse = $this->getAcsClient()->getAcsResponse($request);
-            return (array)$acsResponse;
+            try {
+                $acsResponse = $this->getAcsClient()->getAcsResponse($request);
+                return (array)$acsResponse;
+            }catch (Exception $e) {
+                return array("Code"=>"FAILED" , "Message"=>$e->getErrorMessage());
+            }
         }else{
-            return array("Code"=>0,"msg"=>"参数错误");
+            return array("Code"=>"FAILED","Message"=>"参数错误");
         }
     }
 

+ 7 - 5
application/libraries/Mailer.php

@@ -39,6 +39,8 @@ class Mailer
      * @return bool
      */
     public function send_email($recipient,$subject,$content,$attachments=null){
+        $resp = array();
+        $resp['code'] = "FAILED";
         try{
             if($recipient) {
                 $this->mail->AddAddress($recipient);
@@ -55,15 +57,15 @@ class Mailer
                 }
             }
             if($this->mail->Send()) {
-                return true;
+                $resp['code'] = "OK";
             }else{
-                show_error($this->mail->ErrorInfo);
-                return false;
+                $resp['msg'] = $this->mail->ErrorInfo;
             }
         } catch (phpmailerException $e) {
-            show_error($e->errorMessage(),500); //Pretty error messages from PHPMailer
+            $resp['msg']=$e->errorMessage(); //Pretty error messages from PHPMailer
         } catch (Exception $e) {
-            show_error($e->getMessage(),500); //Boring error messages from anything else!
+            $resp['msg']=$e->errorMessage(); //Boring error messages from anything else!
         }
+        return $resp;
     }
 }

+ 74 - 9
application/libraries/Notices.php

@@ -46,6 +46,9 @@ class Notices{
      * @param $workorder
      */
     public function create_workorder($workorder){
+        $info = array();
+        $info['sms_code'] = "FAILED";
+        $info['email_code'] = "FAILED";
         if(count($workorder['remark_list'])<1) {
             $workorder['remark_list'][0]=array("remark_content"=>"");
         }
@@ -60,8 +63,10 @@ class Notices{
             if($this->setting['sms_type'] == '10' ){
                 if(send_by_modem($this->setting,$receive_user['mobile'],$sms_content)){
                     $notices_log['status'] = "1";
+                    $info['sms_code'] = "OK";
                 }else{
                     $notices_log['status'] = "0";
+                    $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
                 }
             }elseif($this->setting['sms_type'] == '20' ){
                 $sms_content = array(
@@ -73,8 +78,10 @@ class Notices{
                 $resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][0],$sms_content);
                 if($resp['Code'] == 'OK'){
                     $notices_log['status'] = "1";
+                    $info['sms_code'] = "OK";
                 }else{
                     $notices_log['status'] = "0";
+                    $info['sms_msg'] = $resp['Message'];
                 }
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
@@ -122,14 +129,18 @@ class Notices{
             $email_content .=date("Y年m月d日",time()).'</p>';
             $email_content .='</div>';
             $notices_log['content'] = $email_content;
-            if($this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content'])){
+            $resp = $this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content']);
+            if($resp['code'] == 'OK'){
                 $notices_log['status'] = "1";
+                $info['email_code'] = "OK";
             }else{
                 $notices_log['status'] = "0";
+                $info['email_msg'] = $resp['msg'];
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
             $this->CI->noticeslog_model->save_notices_log($notices_log);
         }
+        return $info;
     }
 
     /**
@@ -138,6 +149,9 @@ class Notices{
      * @param $remark
      */
     public function sign_workorder($workorder,$remark){
+        $info = array();
+        $info['sms_code'] = "FAILED";
+        $info['email_code'] = "FAILED";
         $receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
         $admin_list = $this->CI->user_model->select_users("1");
         $sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
@@ -162,8 +176,10 @@ class Notices{
                 if($this->setting['sms_type'] == '10' ){
                     if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
                         $notices_log['status'] = "1";
+                        $info['sms_code'] = "OK";
                     }else{
                         $notices_log['status'] = "0";
+                        $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
                     }
                 }elseif($this->setting['sms_type'] == '20' ){
                     $sms_content = array(
@@ -176,8 +192,10 @@ class Notices{
                     $resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][1],$sms_content);
                     if($resp['Code'] == 'OK'){
                         $notices_log['status'] = "1";
+                        $info['sms_code'] = "OK";
                     }else{
                         $notices_log['status'] = "0";
+                        $info['sms_msg'] = $resp['Message'];
                     }
                 }
                 $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
@@ -225,14 +243,18 @@ class Notices{
             for ($i=0;$i<count($emails);$i++) {
                 $this->CI->mailer->add_recipient($emails[$i]);
             }
-            if ($this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'])) {
+            $resp = $this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content']);
+            if($resp['code'] == 'OK'){
                 $notices_log['status'] = "1";
-            } else {
+                $info['email_code'] = "OK";
+            }else{
                 $notices_log['status'] = "0";
+                $info['email_msg'] = $resp['msg'];
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
             $this->CI->noticeslog_model->save_notices_log($notices_log);
         }
+        return $info;
     }
 
     /**
@@ -241,6 +263,9 @@ class Notices{
      * @param $remark
      */
     public function check_workorder($workorder,$remark){
+        $info = array();
+        $info['sms_code'] = "FAILED";
+        $info['email_code'] = "FAILED";
         $receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
         $admin_list = $this->CI->user_model->select_users("1");
         $sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
@@ -265,8 +290,10 @@ class Notices{
                 if($this->setting['sms_type'] == '10' ){
                     if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
                         $notices_log['status'] = "1";
+                        $info['sms_code'] = "OK";
                     }else{
                         $notices_log['status'] = "0";
+                        $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
                     }
                 }elseif($this->setting['sms_type'] == '20' ){
                     $sms_content = array(
@@ -279,8 +306,10 @@ class Notices{
                     $resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][2],$sms_content);
                     if($resp['Code'] == 'OK'){
                         $notices_log['status'] = "1";
+                        $info['sms_code'] = "OK";
                     }else{
                         $notices_log['status'] = "0";
+                        $info['sms_msg'] = $resp['Message'];
                     }
                 }
                 $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
@@ -333,14 +362,18 @@ class Notices{
             }else{
                 $attachments = null;
             }
-            if ($this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments)) {
+            $resp = $this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments);
+            if($resp['code'] == 'OK'){
                 $notices_log['status'] = "1";
-            } else {
+                $info['email_code'] = "OK";
+            }else{
                 $notices_log['status'] = "0";
+                $info['email_msg'] = $resp['msg'];
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
             $this->CI->noticeslog_model->save_notices_log($notices_log);
         }
+        return $info;
     }
 
     /**
@@ -349,6 +382,9 @@ class Notices{
      * @param $remark
      */
     public function doit_workorder($workorder,$remark){
+        $info = array();
+        $info['sms_code'] = "FAILED";
+        $info['email_code'] = "FAILED";
         $receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
         $admin_list = $this->CI->user_model->select_users("1");
         $sso_admin_list = $this->CI->user_model->set_collection_name("sso_users")->select_users("1");
@@ -373,8 +409,10 @@ class Notices{
                 if($this->setting['sms_type'] == '10' ){
                     if(send_by_modem($this->setting, $notices_log['mobile'], $sms_content)){
                         $notices_log['status'] = "1";
+                        $info['sms_code'] = "OK";
                     }else{
                         $notices_log['status'] = "0";
+                        $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
                     }
                 }elseif($this->setting['sms_type'] == '20' ){
                     $sms_content = array(
@@ -389,6 +427,7 @@ class Notices{
                         $notices_log['status'] = "1";
                     }else{
                         $notices_log['status'] = "0";
+                        $info['sms_msg'] = $resp['Message'];
                     }
                 }
                 $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
@@ -441,14 +480,18 @@ class Notices{
             }else{
                 $attachments = null;
             }
-            if ($this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments)) {
+            $resp = $this->CI->mailer->send_email("", $notices_log['subject'], $notices_log['content'],$attachments);
+            if($resp['code'] == 'OK'){
                 $notices_log['status'] = "1";
-            } else {
+                $info['email_code'] = "OK";
+            }else{
                 $notices_log['status'] = "0";
+                $info['email_msg'] = $resp['msg'];
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
             $this->CI->noticeslog_model->save_notices_log($notices_log);
         }
+        return $info;
     }
 
     /**
@@ -457,6 +500,9 @@ class Notices{
      * @param $remark
      */
     public function reject_workorder($workorder,$remark){
+        $info = array();
+        $info['sms_code'] = "FAILED";
+        $info['email_code'] = "FAILED";
         $receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
         if($this->setting['is_sms'] && in_array("10",$workorder['send_type'])){
             $sms_content = '你的工单已由管理员驳回,请重新处理。工单ID:'.$workorder['workorder_id'].',工单名称:'.$workorder['workorder_name'].',类型:'.$workorder['type'].',备注:'.$remark['remark_content'];
@@ -468,8 +514,10 @@ class Notices{
             if($this->setting['sms_type'] == '10' ){
                 if(send_by_modem($this->setting, $receive_user['mobile'], $sms_content)){
                     $notices_log['status'] = "1";
+                    $info['sms_code'] = "OK";
                 }else{
                     $notices_log['status'] = "0";
+                    $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
                 }
             }elseif($this->setting['sms_type'] == '20' ){
                 $sms_content = array(
@@ -481,8 +529,10 @@ class Notices{
                 $resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
                 if($resp['Code'] == 'OK'){
                     $notices_log['status'] = "1";
+                    $info['sms_code'] = "OK";
                 }else{
                     $notices_log['status'] = "0";
+                    $info['sms_msg'] = $resp['Message'];
                 }
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
@@ -526,14 +576,18 @@ class Notices{
             $email_content .=date("Y年m月d日",time()).'</p>';
             $email_content .='</div>';
             $notices_log['content'] = $email_content;
-            if($this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content'])){
+            $resp = $this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content']);
+            if($resp['code'] == 'OK'){
                 $notices_log['status'] = "1";
+                $info['email_code'] = "OK";
             }else{
                 $notices_log['status'] = "0";
+                $info['email_msg'] = $resp['msg'];
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
             $this->CI->noticeslog_model->save_notices_log($notices_log);
         }
+        return $info;
     }
 
     /**
@@ -541,6 +595,9 @@ class Notices{
      * @param $workorder
      */
     public function finish_workorder($workorder){
+        $info = array();
+        $info['sms_code'] = "FAILED";
+        $info['email_code'] = "FAILED";
         $receive_user = $this->CI->user_model->get_user_with_user_id($workorder['receive_user_id']);
         if($this->setting['is_sms'] && in_array("10",$workorder['send_type'])){
             $sms_content = '你的工单已由管理员结束,工单ID:'.$workorder['workorder_id'].',工单名称:'.$workorder['workorder_name'].',类型:'.$workorder['type'];
@@ -552,8 +609,10 @@ class Notices{
             if($this->setting['sms_type'] == '10' ){
                 if(send_by_modem($this->setting, $receive_user['mobile'], $sms_content)){
                     $notices_log['status'] = "1";
+                    $info['sms_code'] = "OK";
                 }else{
                     $notices_log['status'] = "0";
+                    $info['sms_msg'] = "短信发送失败!端口被占用或者配置错误!";
                 }
             }elseif($this->setting['sms_type'] == '20' ){
                 $sms_content = array(
@@ -564,8 +623,10 @@ class Notices{
                 $resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
                 if($resp['Code'] == 'OK'){
                     $notices_log['status'] = "1";
+                    $info['sms_code'] = "OK";
                 }else{
                     $notices_log['status'] = "0";
+                    $info['sms_msg'] = $resp['Message'];
                 }
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
@@ -606,14 +667,18 @@ class Notices{
             $email_content .=date("Y年m月d日",time()).'</p>';
             $email_content .='</div>';
             $notices_log['content'] = $email_content;
-            if($this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content'])){
+            $resp = $this->CI->mailer->send_email($receive_user['email'],$notices_log['subject'],$notices_log['content']);
+            if($resp['code'] == 'OK'){
                 $notices_log['status'] = "1";
+                $info['email_code'] = "OK";
             }else{
                 $notices_log['status'] = "0";
+                $info['email_msg'] = $resp['msg'];
             }
             $notices_log['create_time'] = new MongoDB\BSON\UTCDateTime(time()*1000);
             $this->CI->noticeslog_model->save_notices_log($notices_log);
         }
+        return $info;
     }
 
     /**

+ 10 - 8
application/views/templates/main.html

@@ -73,8 +73,8 @@
                             <span class="pull-right fa fa-angle-down"></span>
                         </a>
                         <ul id="workorder" class="nav nav-list secondmenu">
-                            <li mid="tab3" funurl="workorder/index"><a href="#" {if $user_type == "2"}class="active"{/if}>待处理工单列表</a></li>
-                            <li mid="tab4" funurl="workorder/finished"><a href="#">已完成工单列表</a></li>
+                            <li mid="tab3" funurl="workorder/index"><a href="javascript:;">待处理工单列表</a></li>
+                            <li mid="tab4" funurl="workorder/finished"><a href="javascript:;">已完成工单列表</a></li>
                         </ul>
                     </li>
                     {if $user_type == "1"}
@@ -84,28 +84,30 @@
                             <span class="pull-right fa fa-angle-down"></span>
                         </a>
                         <ul id="report" class="nav nav-list secondmenu">
-                            <li mid="tab5" funurl="report/index"><a href="#">统计报表</a></li>
+                            <li mid="tab5" funurl="report/index"><a href="javascript:;">统计报表</a></li>
                         </ul>
                     </li>
+                    {if $username == 'admin'}
                     <li>
                         <a href="#users" class="nav-header icon-user" data-toggle="collapse">
                             帐号管理
                             <span class="pull-right fa fa-angle-down"></span>
                         </a>
                         <ul id="users" class="nav nav-list secondmenu">
-                            <li mid="tab6" funurl="user/index"><a href="#">帐号管理</a></li>
+                            <li mid="tab6" funurl="user/index"><a href="javascript:;">帐号管理</a></li>
                         </ul>
                     </li>
+                    {/if}
                     <li>
                         <a href="#systemSetting" class="nav-header icon-setting" data-toggle="collapse">
                             系统管理
                             <span class="pull-right fa fa-angle-down"></span>
                         </a>
                         <ul id="systemSetting" class="nav nav-list secondmenu">
-                            <li mid="tab7" funurl="appauth/index"><a href="#">接入授权管理</a></li>
-                            <li mid="tab8" funurl="template/workorder"><a href="#">工单表格编辑</a></li>
-                            <li mid="tab9" funurl="template/report"><a href="#">报表格式编辑</a></li>
-                            <li mid="tab10" funurl="setting/setting"><a href="#">系统设置</a></li>
+                            <li mid="tab7" funurl="appauth/index"><a href="javascript:;">接入授权管理</a></li>
+                            <li mid="tab8" funurl="template/workorder"><a href="javascript:;">工单表格编辑</a></li>
+                            <li mid="tab9" funurl="template/report"><a href="javascript:;">报表格式编辑</a></li>
+                            <li mid="tab10" funurl="setting/setting"><a href="javascript:;">系统设置</a></li>
                         </ul>
                     </li>
                     {/if}

+ 3 - 3
application/views/templates/report/index.html

@@ -54,19 +54,19 @@
             <legend class="text-center"><h3>响应处置工单系统{$title}统计报表</h3></legend>
             <div class="container-fluid">
                 <div class="row">
-                    <div class="col-sm-6 col-lg-4">
+                    <div class="col-sm-6">
                         <div id="main1" style="width: 100%;height:400px;">
                             <p style="font-size: 18px;font-weight: bold; height: 30px; line-height: 30px">{$title}各个状态的工单的分布</p>
                             <p style="height: 370px; line-height: 350px; text-align: center; color: #999; font-size: 16px;">暂无符合条件的数据</p>
                         </div>
                     </div>
-                    <div class="col-sm-6 col-lg-4">
+                    <div class="col-sm-6">
                         <div id="main2" style="width: 100%;height:400px;">
                             <p style="font-size: 18px;font-weight: bold; height: 30px; line-height: 30px">{$title}各分支的总工单数</p>
                             <p style="height: 370px; line-height: 350px; text-align: center; color: #999; font-size: 16px;">暂无符合条件的数据</p>
                         </div>
                     </div>
-                    <div class="col-sm-6 col-lg-4">
+                    <div class="col-sm-6">
                         <div id="main3" style="width: 100%;height:400px;"></div>
                     </div>
                     <div class="col-sm-6">

+ 1 - 1
application/views/templates/setting/setting.html

@@ -236,7 +236,7 @@
         $("#test").click(function () {
             $("button").attr("disabled","disabled");
             $.post("setting/test", function (data) {
-                layer.msg(data.msg, {icon: data.icon, time: 3000},function () {
+                layer.msg(data.msg, {icon: data.icon, time: 5000},function () {
                     $("button").removeAttr("disabled");
                 });
             }).error(function(xhr,errorText,errorType){

+ 2 - 2
application/views/templates/warning/index.html

@@ -235,9 +235,9 @@
         });
         $("#create_workorder").on('click',function () {
             var ids = "";
-            var branch_id = $("input:checkbox:checked:first").data('branch_id');
+            var branch_id = $("input[name='ids[]']:checkbox:checked:first").data('branch_id');
             $("input:checkbox").each(function () {
-                if($(this).not(":disabled").prop("checked")){
+                if($(this).not(":disabled").not(".check_all").prop("checked")){
                     ids += $(this).val()+",";
                     if($(this).data('branch_id') != branch_id){
                         branch_id = "";

+ 2 - 2
application/views/templates/workorder/create.html

@@ -178,9 +178,9 @@
                 $.post("workorder/save",data,function (data) {
                     layer.msg(data.msg, {
                         icon: data.icon,
-                        time: 3000
+                        time: 5000
                     }, function () {
-                        if(data.icon == 1) {
+                        if(data.icon != 2) {
                             parent.layer.close(layer_index);
                         }else{
                             $("button").removeAttr("disabled");

+ 5 - 5
application/views/templates/workorder/index.html

@@ -205,7 +205,7 @@
                     $.post(
                         "workorder/finish/" + id,
                         function (data) {
-                            layer.msg(data.msg, {icon: data.icon,time: 3000}, function () {
+                            layer.msg(data.msg, {icon: data.icon,time: 5000}, function () {
                                 layer.close(loadindex);
                                 window.location.reload();
                             })
@@ -239,7 +239,7 @@
                             $.post(
                                 "workorder/sign/" + id, {'remark_content': $("#remark_content").val()},
                                 function (data) {
-                                    layer.msg(data.msg, {icon: data.icon, time: 3000}, function () {
+                                    layer.msg(data.msg, {icon: data.icon, time: 5000}, function () {
                                         layer.close(loadindex);
                                         window.location.reload();
                                     })
@@ -273,7 +273,7 @@
                             $.post(
                                 "workorder/reject/" + id, {'remark_content': $("#remark_content").val()},
                                 function (data) {
-                                    layer.msg(data.msg, {icon: data.icon, time: 3000}, function () {
+                                    layer.msg(data.msg, {icon: data.icon, time: 5000}, function () {
                                         layer.close(loadindex);
                                         window.location.reload();
                                     })
@@ -323,7 +323,7 @@
                                                 'action':action
                                             },
                                             function (data) {
-                                                layer.msg(data.msg, {icon: data.icon, time: 3000}, function () {
+                                                layer.msg(data.msg, {icon: data.icon, time: 5000}, function () {
                                                     layer.close(loadindex);
                                                     window.location.reload();
                                                 })
@@ -348,7 +348,7 @@
                                         'action': action
                                     },
                                     function (data) {
-                                        layer.msg(data.msg, {icon: data.icon, time: 3000}, function () {
+                                        layer.msg(data.msg, {icon: data.icon, time: 5000}, function () {
                                             layer.close(loadindex);
                                             window.location.reload();
                                         })