Pārlūkot izejas kodu

Merge branch 'feature/2.1.2' into develop

laiguoran 7 gadi atpakaļ
vecāks
revīzija
066fe6229e

+ 30 - 10
global/css/style.css

@@ -896,13 +896,13 @@ left:5px
   margin:0 0 5px 0
 }
 .wrapLogin .loginPanel{
-  width:400px;
+  width:500px;
   position: absolute;
   bottom:50%;
   right:50%;
   padding:10px 20px;
   background:#F8F8F8;
-  margin:0 -200px -100px 0
+  margin:0 -250px -100px 0
 }
 .wrapLogin .loginPanel img{
   margin:0 0 10px 0;
@@ -1067,10 +1067,20 @@ left:5px
   overflow-y: auto;
 }
 .sign-content .page{
+  margin:0 auto;
+  width:1085px;
+  border: 9px solid transparent;
+  position: relative;
+  overflow: hidden;
+  box-sizing: content-box;
+}
+.warp-printer .page{
+  margin:0 auto;
+  width:1085px;
   border: 9px solid transparent;
   position: relative;
   overflow: hidden;
-  text-align: center
+  box-sizing: content-box;
 }
 .sign-side{
   width:220px;
@@ -1131,13 +1141,15 @@ left:5px
   top:10%;
   left:10%;
   z-index: 999;
-  width:300px
+  width:300px;
+  height: 150px;
 }
 .user-sign .focus{
   background:rgba(255,0,0,0.1);
 }
 .user-sign img{
-  width:inherit;
+  /*width:inherit;*/
+  width: 100%;
 }
 .user-sign .img-bar {
   background:#ddd;
@@ -1145,12 +1157,13 @@ left:5px
   position: absolute;
   right:0;
   top:0;
-  display:none;
-}
-.user-sign:hover .img-bar{
-  display: block;
+  /*display:none;*/
 }
-#draggable{
+/*.user-sign:hover .img-bar{*/
+  /*display: block;*/
+/*}*/
+.draggable{
+  display: none;
   cursor: move;
 }
 .user-sign .img-bar a{
@@ -1228,3 +1241,10 @@ left:5px
 .alert-pnone{
   padding:0 15px !important;
 }
+.qd-table .input-sm{
+  height:20px;
+  padding:2px
+}
+.qd-table>tbody>tr>td, .qd-table>tbody>tr>th, .qd-table>tfoot>tr>td, .qd-table>tfoot>tr>th, .qd-table>thead>tr>td, .qd-table>thead>tr>th {
+  padding:5px 2px
+}

+ 10 - 8
global/js/jlzf-change-new.js

@@ -1,10 +1,11 @@
 $(function(){
     var table = $('#tablelist').DataTable({
         columnDefs: [
-            { className: 'allwidth1', width: 150, targets: 0 },
-            { className: 'allwidth2', width: 200, targets: 1 },
-            { className: 'allwidth4', width: 70, targets: 8 },
-            { className: 'allwidth3', width: 100, targets: '_all' }
+            { className: 'allwidth1', width: 100, targets: 0 },
+            { className: 'allwidth2', width: 150, targets: 1 },
+            { className: 'allwidth4', width: 40, targets: 8 },
+            { className: 'allwidth5', width: 60, targets: 2 },
+            { className: 'allwidth3',width: 80, targets: '_all' }
         ],
         fixedColumns: {
             leftColumns: 4
@@ -267,10 +268,11 @@ $(function(){
         $('#list').html(html);
         table = $('#tablelist').removeAttr('width').DataTable({
             columnDefs: [
-                { className: 'allwidth1', width: 150, targets: 0 },
-                { className: 'allwidth2', width: 200, targets: 1 },
-                { className: 'allwidth4', width: 70, targets: 8 },
-                { className: 'allwidth3', width: 100, targets: '_all' }
+                { className: 'allwidth1', width: 100, targets: 0 },
+                { className: 'allwidth2', width: 150, targets: 1 },
+                { className: 'allwidth4', width: 40, targets: 8 },
+                { className: 'allwidth5', width: 60, targets: 2 },
+                { className: 'allwidth3',width: 80, targets: '_all' }
             ],
             fixedColumns: {
                 leftColumns: 4

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
global/js/jlzf-change-new.min.js


+ 110 - 37
global/js/jlzf-change-pnumset.js

@@ -1,24 +1,24 @@
 $.event.special.valuechange = {
-    teardown: function (namespaces) {
-        $(this).unbind('.valuechange');
-    },
-
-    handler: function (e) {
-        $.event.special.valuechange.triggerChanged($(this));
-    },
-
-    add: function (obj) {
-        $(this).on('keyup.valuechange cut.valuechange paste.valuechange input.valuechange', obj.selector, $.event.special.valuechange.handler)
-    },
-
-    triggerChanged: function (element) {
-        var current = element[0].contentEditable === 'true' ? element.html() : element.val()
-            , previous = typeof element.data('previous') === 'undefined' ? element[0].defaultValue : element.data('previous');
-        if (current !== previous) {
-            element.trigger('valuechange', [element.data('previous')]);
-            element.data('previous', current);
-        }
+teardown: function (namespaces) {
+    $(this).unbind('.valuechange');
+},
+
+handler: function (e) {
+    $.event.special.valuechange.triggerChanged($(this));
+},
+
+add: function (obj) {
+    $(this).on('keyup.valuechange cut.valuechange paste.valuechange input.valuechange', obj.selector, $.event.special.valuechange.handler)
+},
+
+triggerChanged: function (element) {
+    var current = element[0].contentEditable === 'true' ? element.html() : element.val()
+        , previous = typeof element.data('previous') === 'undefined' ? element[0].defaultValue : element.data('previous');
+    if (current !== previous) {
+        element.trigger('valuechange', [element.data('previous')]);
+        element.data('previous', current);
     }
+}
 };
 
 function escapeTags( str ) {
@@ -255,7 +255,8 @@ $(function(){
             var name = $(this).attr('data-uname');
             var company = $(this).attr('data-ucompany');
             var jobs = $(this).attr('data-ujobs');
-            var adduser = uid+'_'+name+'_'+company+'_'+jobs;
+            var email = $(this).attr('data-uemail');
+            var adduser = uid+'_'+name+'_'+company+'_'+jobs+'_'+email;
 
 
             //添加到form中
@@ -270,8 +271,8 @@ $(function(){
                 $('#selectauditlist').val(adduser);
                 $('#reductionAudit').val(uid);
             }
-
         }
+        //approvallist();
     });
 
     //添加到审批流程中
@@ -288,7 +289,13 @@ $(function(){
                 var name = vmsg[1];
                 var company = vmsg[2];
                 var jobs = vmsg[3];
-                var addusertr = '<tr id="user_'+ uid +'" userid="'+ uid +'"><td width="100">'+sort+' 审</td><td width="250"><h4 class="media-heading">'+ jobs +' '+ name +'</h4>'+ company +'</td> <td width="100"></td> <td></td> </tr>';
+                var email = vmsg[4];
+                var addusertr = '<tr>' +
+                    '<td width="100">'+(sort != auditlist.length ? '<i class="glyphicon glyphicon-arrow-down text-muted"></i> 审批': '<i class="glyphicon glyphicon-stop text-muted"></i> 终审') +'</td>' +
+                    '<td width="150"><h4 class="media-heading">'+ name +' </h4>'+ jobs +'</td> ' +
+                    '<td width="200">'+ email +'<br>'+ company +'</td> ' +
+                    '<td width=""><a href="javascript:void(0);" class="btn btn-default btn-sm remove-select-audit" uid="'+ uid +'" title="移除审批人"><span class="glyphicon glyphicon-remove text-danger"></span></a></td>' +
+                    ' </tr>';
                 $('#usertableshow').append(addusertr);
                 auditarray.push(uid);
                 sort++;
@@ -307,26 +314,36 @@ $(function(){
             toastr.error('请输入审批人名称');
             return false;
         }else{
-            var namelist = $('#usernamelist').val().split(',');
-            for(var i = 0; i < namelist.length; i++){
-                if(username == namelist[i]){
-                    toastr.error('列表或常用中已存在当前审批人');
-                    return false;
-                }
-            }
+            var useridlist = $('#useridlist').val().split(',');
+            //for(var i = 0; i < namelist.length; i++){
+            //    if(username == namelist[i]){
+            //        toastr.error('列表或常用中已存在当前审批人');
+            //        return false;
+            //    }
+            //}
+            $('#searchshow').html('');
             $.ajax({
                 type: 'post',
                 url: '/change/user/search?name='+username,
-                data: {namelist:namelist},
+                data: {useridlist:useridlist},
                 dataType: 'json',
                 success: function(result){
                     if(result.code == 400){
                         toastr.error(result.msg);
                     }else{
-                        namelist.push(result.user.name);
-                        $('#usernamelist').val(namelist.join(','));
-                        var adduserhtml = '<div class="col-md-3 alert alert-pnone"><div class="radio" data-uid="'+ result.user.userid +'" data-uname="'+ result.user.name +'" data-ucompany="'+ result.user.company +'" data-ujobs="'+ result.user.jobs +'"><label><input type="radio" value="'+ result.user.userid +'">'+ result.user.name +'</label><div>'+ result.user.jobs +'</div></div></div>';
-                        $('#searchshow').append(adduserhtml);
+                        var userlist = result.userlist;
+                        var adduserhtml = '';
+                        var reductionAudit = $('#reductionAudit').val().split(',');
+                        for(var i in userlist){
+                            //useridlist.push(userlist[i].userid);
+                            if(in_array(reductionAudit,userlist[i].userid)){
+                                adduserhtml += '<div class="col-md-3 alert alert-pnone alert-success"><div class="radio" data-uid="'+ userlist[i].userid +'" data-uname="'+ userlist[i].name +'" data-ucompany="'+ userlist[i].company +'" data-ujobs="'+ userlist[i].jobs +'" data-uemail="'+ userlist[i].email +'"><label><input type="radio" value="'+ userlist[i].userid +'" checked>'+ userlist[i].name +'</label><div>'+userlist[i].jobs +'<br>'+ userlist[i].email +'</div></div></div>';
+                            }else{
+                                adduserhtml += '<div class="col-md-3 alert alert-pnone"><div class="radio" data-uid="'+ userlist[i].userid +'" data-uname="'+ userlist[i].name +'" data-ucompany="'+ userlist[i].company +'" data-ujobs="'+ userlist[i].jobs +'" data-uemail="'+ userlist[i].email +'"><label><input type="radio" value="'+ userlist[i].userid +'">'+ userlist[i].name +'</label><div>'+userlist[i].jobs +'<br>'+ userlist[i].email +'</div></div></div>';
+                            }
+                        }
+                        $('#useridlist').val(useridlist.join(','));
+                        $('#searchshow').html(adduserhtml);
                     }
                 }
             })
@@ -504,7 +521,7 @@ $(function(){
         if(changeaudit !== reductionaudit){
             //不相同则要还原
             $('#selectauditlist').val('');
-            var $rowdiv = $('#addshenpi').find('.row').children('div');
+            var $rowdiv = $('#addshenpi').find('.modal-body').children('.row').children('div');
             $rowdiv.removeClass('alert-success');
             $rowdiv.find('input').prop('checked',false);
 
@@ -520,7 +537,8 @@ $(function(){
                             var name = $rowdivdiv.attr('data-uname');
                             var company = $rowdivdiv.attr('data-ucompany');
                             var jobs = $rowdivdiv.attr('data-ujobs');
-                            var adduser = uid+'_'+name+'_'+company+'_'+jobs;
+                            var email = $rowdivdiv.attr('data-uemail');
+                            var adduser = uid+'_'+name+'_'+company+'_'+jobs+'_'+email;
                             if($('#selectauditlist').val() != ''){
                                 var auditlist2 = $('#selectauditlist').val().split('->');
                                 auditlist2.push(adduser);
@@ -534,12 +552,41 @@ $(function(){
             }
             $('#reductionAudit').val(changeaudit);
         }
+        //approvallist();
         $('#addshenpi').modal('hide');
     });
 
     $('body').on('focus', "#tablelist input", function() {
         $(this).select();
     });
+
+    //移除审批流程
+    $('body').on('click', '.remove-select-audit', function() {
+        var reductionlist = $('#reductionAudit').val().split(',');
+        var changeaudit = $('#changeaudit').val().split(',');
+        var selectlist = $('#selectauditlist').val().split('->');
+        for(var i in reductionlist){
+            if(reductionlist[i] == $(this).attr('uid')){
+                reductionlist.splice(i,1);
+                changeaudit.splice(i,1);
+                selectlist.splice(i,1);
+            }
+        }
+        $('#reductionAudit').val(reductionlist.join(','));
+        $('#changeaudit').val(changeaudit.join(','));
+        $('#selectauditlist').val(selectlist.join('->'));
+        var $rowdiv = $('#addshenpi').find('.modal-body').children('.row').children('.alert-success');
+        for(var j in $rowdiv){
+            if($rowdiv.eq(j).children('div').attr('data-uid') == $(this).attr('uid')){
+                $rowdiv.eq(j).removeClass('alert-success');
+                $rowdiv.eq(j).find('input').prop('checked',false);
+                break;
+            }
+        }
+        $(this).parents('tr').remove();
+
+        //approvallist();
+    });
 });
 
 //根据位数生成编号,3位-》001 ,5位-》00001
@@ -768,4 +815,30 @@ function totalamount(decimal){
     });
     $('.ctatalamount').eq(1).text(ctotalnum != 0 ? roundnum(ctotalnum,decimal) : zero);
     $('.otatalamount').eq(1).text(ototalnum != 0 ? ototalnum : zero);
-}
+}
+
+//判断元素是否在数组中,相当于php的in_array();
+function in_array(arr, obj) {
+    var i = arr.length;
+    while (i--) {
+        if (arr[i] == obj) {
+            return true;
+        }
+    }
+    return false;
+}
+
+//显示并更新审批流程
+//function approvallist(){
+//    $('#selectlist .approval-audit-li').remove();
+//    if($('#selectauditlist').val() != ''){
+//        var auditlist = $('#selectauditlist').val().split('->');
+//        var lihtml = '';
+//        for(var i in auditlist){
+//            var auditArr = auditlist[i].split('_');
+//            var iclass = parseInt(i)+1 == auditlist.length ? ' glyphicon-stop' : ' glyphicon-arrow-down';
+//            lihtml += '<li class="list-group-item approval-audit-li"><i class="glyphicon'+ iclass +' text-muted"></i>'+ auditArr[1] +'<a class="fR text-danger remove-select-audit" uid="'+ auditArr[0] +'" title="移除"><i class="glyphicon glyphicon-remove"></i></a></li>';
+//        }
+//        $('#selectlist').append(lihtml);
+//    }
+//}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
global/js/jlzf-change-pnumset.min.js


+ 5 - 1
global/js/jlzf-change-table.js

@@ -7,7 +7,11 @@ $(function(){
         info: false,
         scrollX: true,
         scrollY: '500px',
-        scrollCollapse: true
+        scrollCollapse: true,
+        language: {
+            emptyTable: "&nbsp;",
+            zeroRecords:"&nbsp;"
+        }
     } );
 });
 function RegNum(obj,e,decimal)

+ 10 - 8
global/js/jlzf-change-update.js

@@ -2,10 +2,11 @@ $(function(){
     var cid = $.trim($('#cid').val());
     var table = $('#tablelist').removeAttr('width').DataTable({
         columnDefs: [
-            { className: 'allwidth1', width: 150, targets: 0 },
-            { className: 'allwidth2', width: 200, targets: 1 },
-            { className: 'allwidth4', width: 70, targets: 8 },
-            { className: 'allwidth3',width: 100, targets: '_all' }
+            { className: 'allwidth1', width: 100, targets: 0 },
+            { className: 'allwidth2', width: 150, targets: 1 },
+            { className: 'allwidth4', width: 40, targets: 8 },
+            { className: 'allwidth5', width: 60, targets: 2 },
+            { className: 'allwidth3',width: 80, targets: '_all' }
         ],
         fixedColumns: {
             leftColumns: 4
@@ -278,10 +279,11 @@ $(function(){
         $('#list').html(html);
         table = $('#tablelist').removeAttr('width').DataTable({
             columnDefs: [
-                { className: 'allwidth1', width: 150, targets: 0 },
-                { className: 'allwidth2', width: 200, targets: 1 },
-                { className: 'allwidth4', width: 70, targets: 8 },
-                { className: 'allwidth3', width: 100, targets: '_all' }
+                { className: 'allwidth1', width: 100, targets: 0 },
+                { className: 'allwidth2', width: 150, targets: 1 },
+                { className: 'allwidth4', width: 40, targets: 8 },
+                { className: 'allwidth5', width: 60, targets: 2 },
+                { className: 'allwidth3',width: 80, targets: '_all' }
             ],
             fixedColumns: {
                 leftColumns: 4

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
global/js/jlzf-change-update.min.js


+ 6 - 1
protected/class/change.php

@@ -212,7 +212,7 @@ class Changes
 
     public function getPmidGroup($uid)
     {
-        return $this->__changeaudit->find(array('where' => 'uid=?', 'param' => array($uid), 'groupby' => 'pmid', 'asArray' => TRUE));
+        return $this->__changeaudit->find(array('where' => 'uid=? and cid in (SELECT `jl_change`.`cid` FROM `jl_change` WHERE `jl_change`.status!="uncheck")', 'param' => array($uid), 'groupby' => 'pmid', 'asArray' => TRUE));
     }
 
     public function getNumbyMydetail($pmid='',$uid)
@@ -287,6 +287,11 @@ class Changes
         return $this->__changeaudit->delete(array('where' => 'cid=?', 'param' => array($cid), 'asArray' => TRUE));
     }
 
+    public function getChangeAuditsMaxUsite($cid,$times)
+    {
+        return $this->__changeaudit->getOne(array('select' => 'MAX(usite) as maxsite', 'where' => 'cid=? and times=?', 'groupby' => 'times', 'param' => array($cid,$times) , 'asArray' => TRUE));
+    }
+
 
     //changeauditlist
     public function getChangeAuditListbycid($cid)

+ 13 - 1
protected/class/extras/Uploader.php

@@ -58,7 +58,10 @@ class FileUpload {
 
         if ($this->fileName) {
             $this->fileName = $this->sanitizeFilename($this->fileName);
-            $pathinfo = pathinfo($this->fileName);
+
+            //弃用原生pathinfo(),原因在低版本的php环境下无法正确读取文件名称。
+            //$pathinfo = pathinfo($this->fileName);
+            $pathinfo = $this->mb_pathinfo($this->fileName);
 
             if (isset($pathinfo['extension']) &&
                 isset($pathinfo['filename']))
@@ -85,6 +88,15 @@ class FileUpload {
         return substr(basename('X'.$splited[count($splited)-1], $suffix), 1);
     }
 
+    private function mb_pathinfo($filepath) {
+        preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im',$filepath,$m);
+        if($m[1]) $ret['dirname']=$m[1];
+        if($m[2]) $ret['basename']=$m[2];
+        if($m[5]) $ret['extension']=$m[5];
+        if($m[3]) $ret['filename']=$m[3];
+        return $ret;
+    }
+
     public function getFileName() {
         return $this->fileName;
     }

+ 2 - 2
protected/class/itemmeasurenum.php

@@ -121,8 +121,8 @@ class ItemMeasureNumpofper
     {
         $list = $this->__itemMeasureNum->find(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
         if(!empty($list)){
-            include (DOO::conf()->SITE_PATH . 'protected/class/itemfile.php');
-//            Doo::loadClass('itemfile');
+//            include (DOO::conf()->SITE_PATH . 'protected/class/itemfile.php');
+            Doo::loadClass('itemfile');
             include (DOO::conf()->SITE_PATH . 'protected/plugin/io.han.php');
             foreach($list as $k => $v){
                 $itemfile = new ItemFile();

+ 1 - 1
protected/class/profile.php

@@ -101,7 +101,7 @@ class Profile
 
     public function checkUserName($name)
     {
-        return $this->uprofile->getOne(array('select' => 'userid,name,company,jobs', 'where' => 'name LIKE "%'.$name.'%"', 'userid' => 'asc', 'limit' => 1, 'asArray' => TRUE));
+        return $this->uprofile->find(array('select' => 'userid,name,company,jobs', 'where' => 'name LIKE "%'.$name.'%" and userid in(select uid from jl_users where isstop=0)', 'userid' => 'asc', 'asArray' => TRUE));
     }
 }
 

+ 1 - 1
protected/class/sign.php

@@ -188,7 +188,7 @@ class Signn
     }
 
     public function delSignbysid($sid,$status){
-        if($status == 'checking'){
+        if($status == 'checking' || $status == 'checked'){
 
             $this->_signaudit->sid = $sid;
             $this->_signaudit->delete();

+ 13 - 30
protected/class/sms.php

@@ -2,14 +2,12 @@
 
 class Sms
 {
-    private $api_url, $account, $password, $extno, $errorMsg;
+    private $api_url, $auth_key, $errorMsg;
 
-    function __construct($api_url, $account,$password,$extno)
+    function __construct($api_url, $auth_key)
     {
         $this->api_url = $api_url;
-        $this->account = $account;
-        $this->password = $password;
-        $this->extno = $extno;
+        $this->auth_key = $auth_key;
     }
 
     /**
@@ -19,38 +17,20 @@ class Sms
     public function sendSms($mobile, $code)
     {
         $send = array(
-            'action' => 'send',
-            'account' => $this->account,
-            'password' => $this->password,
+            'apikey' => $this->auth_key,
             'mobile' => $mobile,
-            'content' => $code,
-            'extno' => $this->extno
+            'text' => $code
         );
         $data = http_build_query($send);
-        $res = simplexml_load_string($this->_httpClient($this->api_url,$data));
+        $res = json_decode($this->_httpClient($this->api_url,$data));
         $resArr = $this->objectToArray($res);
-        $resultcode = !empty($resArr) ? explode('#@#',$resArr['resplist']['resp'])[2] : '';
-        if ($resultcode == '0') return true;
+        if (!empty($resArr) && $resArr["code"] == 0) return true;
         else {
-            if (empty($this->errorMsg)) $this->errorMsg = !empty($resultcode) ? $this->getErrorMsg($resultcode) : '未知错误';
+            if (empty($this->errorMsg)) $this->errorMsg = !empty($resArr["msg"]) ? $resArr["msg"] : '未知错误';
             return false;
         }
     }
 
-    function getErrorMsg($code){
-        $msg = '';
-        switch($code){
-            case 6: $msg = '错误代码:6,请联系我们客服';break;
-            case 10: $msg = '错误代码:10,请联系我们客服';break;
-            case 12: $msg = '检查接收短信手机号码格式是否正确';break;
-            case 15: $msg = '错误代码:15,请联系我们客服';break;
-            case 16: $msg = '一天时间内同一个手机号码不能太频繁接收短信';break;
-            case 17: $msg = '错误代码:17,请联系我们客服';break;
-            default : $msg = '错误代码:400,请联系我们客服';break;
-        }
-        return $msg;
-    }
-
     //对象转数组,使用get_object_vars返回对象属性组成的数组
     function objectToArray($array)
     {
@@ -74,10 +54,13 @@ class Sms
     {
         try {
             $ch = curl_init();
-            curl_setopt($ch, CURLOPT_URL,$api_url.$data);
+            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept:text/plain;charset=utf-8', 'Content-Type:application/x-www-form-urlencoded', 'charset=utf-8'));
+            curl_setopt($ch, CURLOPT_URL, $api_url);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-            curl_setopt($ch, CURLOPT_HEADER, 0);
+            curl_setopt($ch, CURLOPT_POST, 1);
             curl_setopt($ch, CURLOPT_TIMEOUT, 10);
+            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
             $res = curl_exec($ch);
             curl_close($ch);
             return $res;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 5
protected/config/sms.conf.php


+ 1 - 1
protected/config/ver.conf.php

@@ -1,5 +1,5 @@
 <?php
 
 // Version
-$config['ver'] = 'v2.1.1';
+$config['ver'] = 'v2.1.2';
 

+ 1 - 1
protected/controller/AppController.php

@@ -51,7 +51,7 @@ class AppController extends DooController {
         $this->modelconfig = new AConfig();
         $this->itemMeasureNum = new ItemMeasureNumpofper();
         $this->aconfig = new AConfig();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
         $this->__hashids = new Hashids\Hashids('jlzfuserid', 8);
     }
 

+ 65 - 25
protected/controller/ChangeController.php

@@ -25,9 +25,9 @@ class ChangeController extends DooController
 
     private $aconfig, $data, $sms, $sign, $change, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $measureauditact, $numofperact, $__hashids, $statusArray = array('uncheck' => '<span class = "colGray">未审批</span>', 'checking' => '<span class = "colOrange">审批中</span>', 'checked' => '<span class = "colGreen">审批通过</span>', 'checkno' => '<span class = "colRed">审批不通过</span>');
 
-    private $changeType = array('1' => 'A.位置', '2' => 'B.数量', '3' => 'C.结构', '4' => 'D.新增', '5' => 'E.取消', '6' => 'F.纠错');
+    private $changeType = array('2' => 'A.数量', '1' => 'B.位置', '3' => 'C.结构', '4' => 'D.新增', '5' => 'E.取消', '6' => 'F.纠错');
 
-    private $changeCategory = array('1' => 'A类变更(设计变更)', '2' => 'B类变更(施工措施变更)', '3' => 'C类变更(计划变更)', '4' => 'D类变更(条件变更)', '5' => 'E类变更(新增工程)');
+    private $changeCategory = array('1' => 'A类变更', '2' => 'B类变更', '3' => 'C类变更', '4' => 'D类变更', '5' => 'E类变更');
 
     private $changeNature = array('1' => '一般设计变更', '2' => '较大设计变更', '3' => '重大设计变更');
 
@@ -350,7 +350,7 @@ class ChangeController extends DooController
                     $ototalnum = 0;
                     $ctotalnum = 0;
                     $stotalnum = 0;
-                    $listtablehtml = '<table class="table table-striped table-bordered nowrap" id="tablelist" cellspacing="0" width="100%">
+                    $listtablehtml = '<table class="table table-striped table-bordered nowrap qd-table" id="tablelist" cellspacing="0" width="100%">
 								<thead>
 									<tr><th rowspan="2" class="text-center" width="100">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th>';
                     $thhtml = '<th class="text-center">数量</th>
@@ -479,6 +479,12 @@ class ChangeController extends DooController
 
                 //获取审批流程列表
                 $auditlist = $this->change->getChangeAuditsbySort($cid);
+                if(!empty($auditlist)){
+                    foreach($auditlist as $ak => $av){
+                        $auditlist[$ak]['email'] = $this->auth->getEmail($av['uid']);
+                        $auditlist[$ak]['lastusite'] = $this->change->getChangeAuditsMaxUsite($cid,$av['times'])['maxsite'];
+                    }
+                }
                 $this->data['auditlist'] = $auditlist;
 
                 $this->render('biangeng-detail', $this->data, TRUE);
@@ -684,7 +690,7 @@ class ChangeController extends DooController
             $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
             $inside = 1;
             $userlist = array();
-            $usernamelist = array();
+            $useridlist = array();
             if(!empty($auditactlist)){
                 foreach($auditactlist as $k => $v){
                     if($measureArray['uid'] == $v['auditoruid']){
@@ -696,7 +702,8 @@ class ChangeController extends DooController
                     $userlist[$k]['jobs'] = $usermsg['jobs'];
                     $userlist[$k]['avatar'] = $usermsg['avatar'];
                     $userlist[$k]['company'] = $usermsg['company'];
-                    array_push($usernamelist, $usermsg['name']);
+                    $userlist[$k]['email'] = $this->auth->getEmail($v['auditoruid']);
+                    array_push($useridlist, $usermsg['userid']);
                 }
             }
             if($inside){
@@ -706,15 +713,18 @@ class ChangeController extends DooController
                 $orginArray['name'] = $usermsg2['name'];
                 $orginArray['jobs'] = $usermsg2['jobs'];
                 $orginArray['company'] = $usermsg2['company'];
+                $orginArray['email'] = $this->auth->getEmail($measureArray['uid']);
                 array_push($userlist,$orginArray);
-                array_push($usernamelist, $usermsg2['name']);
+                array_push($useridlist, $usermsg2['userid']);
             }
 
             $this->data['pmArray'] = $pmArray;
             $this->data['userlist'] = $userlist;
-            $this->data['usernamelist'] = implode(',',$usernamelist);
+            $this->data['useridlist'] = implode(',',$useridlist);
 
-            $this->data['userArray'] = $this->auth->getRowByUid($this->auth->getUid());
+            $userArray = $this->auth->getRowByUid($this->auth->getUid());
+            $userArray['email'] = $this->auth->getEmail($this->auth->getUid());
+            $this->data['userArray'] = $userArray;
 
             $this->data['list'] = $list;
             $this->data['year'] = date('Y',time());
@@ -916,6 +926,11 @@ class ChangeController extends DooController
                             $changeaudit = new ChangeAudit();
                             //获取最后一次上报的上报人信息
                             $auditArray = $changeaudit->getChangeAuditLastUser($cid,0);
+                            //获取uid最新上报人信息
+                            $userArray = $this->auth->getRowByUid($auditArray['uid']);
+                            $auditArray['company'] = $userArray['company'];
+                            $auditArray['jobs'] = $userArray['jobs'];
+                            $auditArray['name'] = $userArray['name'];
                             //获取最后一个审批人的usort
                             $auditArray2 = $changeaudit->getChangeAuditLastUser($cid);
                             //新建新的提交人,并把time+1
@@ -978,7 +993,7 @@ class ChangeController extends DooController
                 $ototalnum = 0;
                 $ctotalnum = 0;
                 $stotalnum = 0;
-                $listtablehtml = '<table class="table table-striped table-bordered nowrap" id="tablelist" cellspacing="0" width="100%">
+                $listtablehtml = '<table class="table table-striped table-bordered nowrap qd-table" id="tablelist" cellspacing="0" style="width:100%">
 								<thead>
 									<tr><th rowspan="2" class="text-center" width="100">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th>';
                 $thhtml = '<th class="text-center">数量</th>
@@ -1101,6 +1116,12 @@ class ChangeController extends DooController
                 $this->data['attlist'] = $showattlist;
 
                 $auditlist2 = $this->change->getChangeAuditsbySort($cid);
+                if(!empty($auditlist2)){
+                    foreach($auditlist2 as $ak => $av){
+                        $auditlist2[$ak]['email'] = $this->auth->getEmail($av['uid']);
+                        $auditlist2[$ak]['lastusite'] = $this->change->getChangeAuditsMaxUsite($cid,$av['times'])['maxsite'];
+                    }
+                }
                 $this->data['auditlist'] = $auditlist2;
 
                 //判断是否为本标段终审人
@@ -1344,7 +1365,7 @@ class ChangeController extends DooController
                 $measureArray = $this->actmeasure->getRowByPmid($pmArray['pmid']);
                 $inside = 1;
                 $userlist = array();
-                $usernamelist = array();
+                $useridlist = array();
                 if(!empty($auditactlist)){
                     foreach($auditactlist as $k => $v){
                         if($measureArray['uid'] == $v['auditoruid']){
@@ -1356,7 +1377,8 @@ class ChangeController extends DooController
                         $userlist[$k]['jobs'] = $usermsg['jobs'];
                         $userlist[$k]['avatar'] = $usermsg['avatar'];
                         $userlist[$k]['company'] = $usermsg['company'];
-                        array_push($usernamelist, $usermsg['name']);
+                        $userlist[$k]['email'] = $this->auth->getEmail($v['auditoruid']);
+                        array_push($useridlist, $usermsg['userid']);
                     }
                 }
                 if($inside){
@@ -1366,27 +1388,30 @@ class ChangeController extends DooController
                     $orginArray['name'] = $usermsg2['name'];
                     $orginArray['jobs'] = $usermsg2['jobs'];
                     $orginArray['company'] = $usermsg2['company'];
+                    $orginArray['email'] = $this->auth->getEmail($measureArray['uid']);
                     array_push($userlist,$orginArray);
-                    array_push($usernamelist, $usermsg2['name']);
+                    array_push($useridlist, $usermsg2['userid']);
                 }
 
                 //获取已选审批人列表,生成changeaudit和selectauditlist,并把未在常用审批人的uid找出来
                 $auditlist = $this->change->getChangeAuditsbycidtime($cid,$changeArray['times']);
                 $changeauditList = array();
                 $selectauditlist = array();
-                $searchauditlist = array();
                 foreach($auditlist as $adk => $adv){
+                    $email = $this->auth->getEmail($adv['uid']);
+                    $auditlist[$adk]['email'] = $email;
+                    $auditlist[$adk]['lastusite'] = count($auditlist);
                     array_push($changeauditList,$adv['uid']);
-                    $addauditlist = $adv['uid'].'_'.$adv['name'].'_'.$adv['company'].'_'.$adv['jobs'];
+                    $addauditlist = $adv['uid'].'_'.$adv['name'].'_'.$adv['company'].'_'.$adv['jobs'].'_'.$email;
                     array_push($selectauditlist,$addauditlist);
-                    if(!in_array($adv['name'],$usernamelist)){
-                        array_push($searchauditlist,$auditlist[$adk]);
-                        array_push($usernamelist,$adv['name']);
-                    }
+//                    if(!in_array($adv['uid'],$useridlist)){
+//                        $auditlist[$adk]['email'] = $this->auth->getEmail($adv['uid']);
+//                        array_push($useridlist,$adv['uid']);
+//                    }
+                    $auditlist[$adk]['islast'] = $adk+1 == count($auditlist) ? 1 : 0;
                 }
                 $this->data['changeaudit'] = implode(',',$changeauditList);
                 $this->data['selectauditlist'] = implode('->',$selectauditlist);
-                $this->data['sauditlist'] = $searchauditlist;
                 $this->data['auditlist'] = $auditlist;
 
                 //获取已选清单列表,已选清单id列表,属于签约清单的changelist,和changewhitelist
@@ -1449,9 +1474,11 @@ class ChangeController extends DooController
                 $this->data['changeArray'] = $changeArray;
                 $this->data['pmArray'] = $pmArray;
                 $this->data['userlist'] = $userlist;
-                $this->data['usernamelist'] = implode(',',$usernamelist);
+                $this->data['useridlist'] = implode(',',$useridlist);
 
-                $this->data['userArray'] = $this->auth->getRowByUid($this->auth->getUid());
+                $userArray = $this->auth->getRowByUid($this->auth->getUid());
+                $userArray['email'] = $this->auth->getEmail($this->auth->getUid());
+                $this->data['userArray'] = $userArray;
                 $this->data['list'] = $list;
                 $this->data['year'] = date('Y',time());
 
@@ -1459,6 +1486,12 @@ class ChangeController extends DooController
                 if($changeArray['status'] == 'back'){
                     $creatorArray = $this->change->getChangeAuditLastUser($cid,0);
                     $auditlist2 = $this->change->getChangeAuditsbySort($cid,$creatorArray['times']);
+                    if(!empty($auditlist2)){
+                        foreach($auditlist2 as $ak => $av){
+                            $auditlist2[$ak]['email'] = $this->auth->getEmail($av['uid']);
+                            $auditlist2[$ak]['lastusite'] = $this->change->getChangeAuditsMaxUsite($cid,$av['times'])['maxsite'];
+                        }
+                    }
                     $this->data['auditlist2'] = $auditlist2;
                 }
 
@@ -1527,12 +1560,19 @@ class ChangeController extends DooController
 
         $usermsg = $this->profile->checkUserName($_GET['name']);
         if(!empty($usermsg)){
-            $namelist = $_POST['namelist'];
-            if(in_array($usermsg['name'], $namelist)){
-                echo json_encode(array('code' => 400, 'msg' => '列表或常用中已存在当前审批人'));
+            $useridlist = $_POST['useridlist'];
+            $userlist = array();
+            foreach($usermsg as $k => $v){
+                if(!in_array($v['userid'], $useridlist)){
+                    $usermsg[$k]['email'] = $this->auth->getEmail($v['userid']);
+                    array_push($userlist,$usermsg[$k]);
+                }
+            }
+            if(!empty($userlist)){
+                echo json_encode(array('code' => 200, 'userlist' => $userlist));
                 exit;
             }else{
-                echo json_encode(array('code' => 200, 'user' => $usermsg));
+                echo json_encode(array('code' => 400, 'msg' => '常用中已存在当前审批人'));
                 exit;
             }
         }else{

+ 1 - 1
protected/controller/ClientController.php

@@ -89,7 +89,7 @@ class ClientController extends DooController
         $this->sign = new signn();
         $this->concern = new MeasureConcerner();
         $this->change = new Changes();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
     }
 
     public function ClientSignin()

+ 1 - 1
protected/controller/RProjectController.php

@@ -45,7 +45,7 @@ class RProjectController extends DooController
         $this->att = new attachment();
         $this->sign = new Signn();
         $this->change = new Changes();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
         $this->data['currChannle'] = 'r';
         $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());

+ 4 - 4
protected/controller/SignController.php

@@ -52,7 +52,7 @@ class SignController extends DooController
         $this->measureauditact = new MeasureauditAct();
         $this->sign = new Signn();
         $this->change = new Changes();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
         $this->data['currChannle'] = 'sign';
         $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
@@ -708,10 +708,10 @@ class SignController extends DooController
      */
     public function signList()
     {
-        if(isset($_POST['delid']) && is_numeric($_POST['delid'])){
+        if(isset($_POST['delid']) && is_numeric($_POST['delid']) && isset($_POST['deltext']) && trim($_POST['deltext']) == '删除报表'){
             //删除未签署报表数据和文件
             $signmsg = $this->sign->getOneSignbysid($_POST['delid']);
-            if(empty($signmsg) && $signmsg['status'] == "checked" && $signmsg['ownuid'] != $this->auth->getUid()){
+            if(empty($signmsg) && $signmsg['ownuid'] != $this->auth->getUid()){
                 exit(json_encode(array('code' => 400),JSON_UNESCAPED_UNICODE));
             }
             $this->sign->delSignbysid($_POST['delid'],$signmsg['status']);
@@ -802,7 +802,7 @@ class SignController extends DooController
 //                $list[$k]['phaseno'] = $phaseno['numpname'];
                 $list[$k]['ownname'] = $this->auth->getName($v['ownuid']);
                 $list[$k]['auditname'] = $this->auth->getName($v['audituid']);
-                $list[$k]['delstatus'] = $this->auth->getUid() == $v['ownuid'] && $v['status'] != 'checked' && $v['isinter'] != 3 ? 1 : 0;
+                $list[$k]['delstatus'] = $this->auth->getUid() == $v['ownuid'] && $v['isinter'] != 3 ? 1 : 0;
             }
         }
 

+ 6 - 2
protected/controller/UserController.php

@@ -56,7 +56,7 @@ class UserController extends DooController
         $this->numofperact = new NumofperAct();
         $this->user = new User();
         $this->ph = new PasswordHash(8, FALSE);
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
         $this->aconfig = new AConfig();
         $this->measureauditact = new MeasureauditAct();
         $this->sign = new signn();
@@ -293,9 +293,13 @@ class UserController extends DooController
             if (isset($vmArray) && $vmArray) {
                 if (md5($_POST['mobile'] . $_POST['verifycode']) == md5($vmArray['mobile'] . $vmArray['code'])) {
                     $this->profile->updateMobile($this->auth->getUid(), $vmArray['mobile']);
-                    return Doo::conf()->APP_URL . 'user/profile/sms/edit';
+                    echo json_encode(array('code' => 200));
+                    die;
+//                    return Doo::conf()->APP_URL . 'user/profile/sms/edit';
                 }
             }
+            echo json_encode(array('code' => 400));
+            die;
         }
         $this->data['uprofile'] = $this->profile->getProWithUid($this->auth->getUid());
         $this->render('edit-profile-sms-edit', $this->data, TRUE);

+ 0 - 1
protected/model/changeaudit.php

@@ -43,7 +43,6 @@ class ChangeAudit extends DooModel {
         $this->uid = $auditArray['uid'];
         $this->company = $auditArray['company'];
         $this->jobs = $auditArray['jobs'];
-        $this->jobs = $auditArray['jobs'];
         $this->name = $auditArray['name'];
         $this->status = $status;
         $this->insert();

+ 20 - 12
protected/view/biangeng-approval.html

@@ -19,16 +19,19 @@
 			width: 100%
 		}
 		.allwidth1{
-			/*width: 16% !important;*/
-			max-width: 250px !important;
+
 		}
 		.allwidth2{
-			/*width: 9% !important;*/
-			max-width: 150px !important;
+
 		}
 		.allwidth3{
-			/*width: 5% !important;*/
-			max-width: 100px !important;
+			text-align:right;
+		}
+		.allwidth3 input{
+			text-align:right;
+		}
+		.allwidth5{
+			text-align:center;
 		}
 		div.DTFC_LeftFootWrapper table, div.DTFC_RightFootWrapper table{
 			border-top: 1px solid #ddd;
@@ -36,6 +39,9 @@
 		div.dataTables_scrollFootInner table{
 			margin-top: 0 !important;
 		}
+		.bg-con-warp:nth-child(2) th{
+			text-align: center !important;
+		}
 	</style>
 </head>
 <body>
@@ -170,9 +176,10 @@
 						<table class="table table-bordered">
 							<!-- loop auditlist -->
 							<tr>
-								<td width="100"><!-- if {{auditlist' value.usite}} == 0 -->提交人<!-- else -->{{auditlist' value.usite}} 审<!-- endif --></td>
-								<td width="250"><h4 class="media-heading">{{auditlist' value.jobs}} {{auditlist' value.name}}</h4>
-									{{auditlist' value.company}}</td>
+								<td width="100"><!-- if {{auditlist' value.usite}} == 0 --><i class="glyphicon glyphicon-download text-muted"></i> 提交<!-- else --><!-- if {{auditlist' value.usite}} != {{auditlist' value.lastusite}} --><i class="glyphicon glyphicon-arrow-down text-muted"></i> 审批<!-- else --><i class="glyphicon glyphicon-stop text-muted"></i> 终审<!-- endif --><!-- endif --></td>
+								<td width="150"><h4 class="media-heading">{{auditlist' value.name}}</h4>
+									{{auditlist' value.jobs}} </td>
+								<td width="200">{{auditlist' value.email}}<br>{{auditlist' value.company}}</td>
 								<!-- if {{auditlist' value.usite}} == 0 -->
 								<!-- if {{auditlist' value.status}} == 'checked' --><td width="100" class="colGreen">上报完成</td><td>{{formatDate(auditlist' value.sintime)}}<br></td>
 								<!-- elseif {{auditlist' value.times}} == 0  && {{auditlist' value.status}} == 'checking' --><td width="100" class="colOrange">上报中</td><td><br></td>
@@ -339,9 +346,10 @@
 
 		var table = $('#tablelist').removeAttr('width').DataTable({
 			columnDefs: [
-				{ className: 'allwidth1', width: 200, targets: 1 },
-				{ className: 'allwidth3', width: 60, targets: 2 },
-				{ className: 'allwidth2', width: 100, targets: '_all' }
+				{ className: 'allwidth1', width: 90, targets: 0 },
+				{ className: 'allwidth2', width: 150, targets: 1 },
+				{ className: 'allwidth5', width: 60, targets: 2 },
+				{ className: 'allwidth3',width: 80, targets: '_all' }
 			],
 			fixedColumns: {
 				leftColumns: 4

+ 26 - 17
protected/view/biangeng-detail.html

@@ -17,18 +17,19 @@
 		#list td input{
 			width: 100%
 		}
-
 		.allwidth1{
-			/*width: 16% !important;*/
-			max-width: 250px !important;
+
 		}
 		.allwidth2{
-			/*width: 9% !important;*/
-			max-width: 150px !important;
 		}
 		.allwidth3{
-			 /*width: 5% !important;*/
-			 max-width: 100px !important;
+			text-align:right;
+		}
+		.allwidth4{
+			text-align: right;
+		}
+		.allwidth5{
+			text-align:center;
 		}
 		div.DTFC_LeftFootWrapper table, div.DTFC_RightFootWrapper table{
 			border-top: 1px solid #ddd;
@@ -36,6 +37,9 @@
 		div.dataTables_scrollFootInner table{
 			margin-top: 0 !important;
 		}
+		.bg-con-warp:nth-child(2) th{
+			text-align: center !important;
+		}
 	</style>
 </head>
 <body>
@@ -151,7 +155,7 @@
 					<div class="bg-con-warp">
 						<legend id="qingdan" ><span class="glyphicon glyphicon-list-alt"></span> 变更清单 <label class="legend-label"><input type="checkbox"> 查看审批过程</label></legend>
 
-						<table id="tablelist" class="table table-striped table-bordered nowrap" cellspacing="0" width="100%">
+						<table id="tablelist" class="table table-striped table-bordered nowrap qd-table" cellspacing="0" style="width:100%">
 							<thead>
 							<tr><th rowspan="2" class="text-center">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th><th colspan="2" class="text-center">审批后变更</th></tr>
 							<tr><th class="text-center">数量</th><th class="text-center">金额</th><th class="text-center">数量</th><th class="text-center">金额</th><th class="text-center">数量</th><th class="text-center">金额</th></tr>
@@ -186,9 +190,10 @@
 						<table class="table table-bordered">
 							<!-- loop auditlist -->
 							<tr>
-								<td width="100"><!-- if {{auditlist' value.usite}} == 0 -->提交人<!-- else -->{{auditlist' value.usite}} 审<!-- endif --></td>
-								<td width="250"><h4 class="media-heading">{{auditlist' value.jobs}} {{auditlist' value.name}}</h4>
-									{{auditlist' value.company}}</td>
+								<td width="100"><!-- if {{auditlist' value.usite}} == 0 --><i class="glyphicon glyphicon-download text-muted"></i> 提交<!-- else --><!-- if {{auditlist' value.usite}} != {{auditlist' value.lastusite}} --><i class="glyphicon glyphicon-arrow-down text-muted"></i> 审批<!-- else --><i class="glyphicon glyphicon-stop text-muted"></i> 终审<!-- endif --><!-- endif --></td>
+								<td width="150"><h4 class="media-heading">{{auditlist' value.name}}</h4>
+									{{auditlist' value.jobs}} </td>
+								<td width="200">{{auditlist' value.email}}<br>{{auditlist' value.company}}</td>
 								<!-- if {{auditlist' value.usite}} == 0 -->
 									<!-- if {{auditlist' value.status}} == 'checked' --><td width="100" class="colGreen">上报完成</td><td>{{formatDate(auditlist' value.sintime)}}<br></td>
 									<!-- elseif {{auditlist' value.times}} == 0  && {{auditlist' value.status}} == 'checking' --><td width="100" class="colOrange">上报中</td><td><br></td>
@@ -221,9 +226,12 @@
 	$(function() {
 		var table = $('#tablelist').removeAttr('width').DataTable({
 			columnDefs: [
-				{ className: 'allwidth1', width: 230, targets: 1 },
-				{ className: 'allwidth3', width: 80, targets: 2 },
-				{ className: 'allwidth2', width: 120, targets: '_all' }
+				{ className: 'allwidth1', width: 90, targets: 0 },
+				{ className: 'allwidth2', width: 150, targets: 1 },
+				{ className: 'allwidth5', width: 50, targets: 2 },
+				{ className: 'allwidth3', width: 60, targets: 3 },
+				{ className: 'allwidth4', width: 70, targets: [4,6,8] },
+				{ className: 'allwidth3',width: 80, targets: '_all' }
 			],
 			fixedColumns: {
 				leftColumns: 4
@@ -245,9 +253,10 @@
 					$('#tablelist').html(result.html);
 					table = $('#tablelist').removeAttr('width').DataTable({
 						columnDefs: [
-							{ className: 'allwidth1', width: 230, targets: 1 },
-							{ className: 'allwidth3', width: 80, targets: 2 },
-							{ className: 'allwidth2', width: 120, targets: '_all' }
+							{ className: 'allwidth1', width: 100, targets: 0 },
+							{ className: 'allwidth2', width: 150, targets: 1 },
+							{ className: 'allwidth5', width: 60, targets: 2 },
+							{ className: 'allwidth3',width: 80, targets: '_all' }
 						],
 						fixedColumns: {
 							leftColumns: 4

+ 30 - 24
protected/view/biangeng-new.html

@@ -22,20 +22,22 @@
 			width: 100%
 		}
 		.allwidth1{
-			width: 15% !important;
-			max-width: 200px !important;
+
 		}
 		.allwidth2{
-			width: 20% !important;
-			max-width: 300px !important;
+
 		}
 		.allwidth3{
-			width: 10% !important;
-			max-width: 150px !important;
+			text-align:right;
+		}
+		.allwidth3 input{
+			text-align:right;
+		}
+		.allwidth5{
+			text-align:center;
 		}
 		.allwidth4{
-			width: 5% !important;
-			max-width: 70px !important;
+			text-align:center;
 		}
 		div.DTFC_LeftFootWrapper table, div.DTFC_RightFootWrapper table{
 			border-top: 1px solid #ddd;
@@ -52,6 +54,9 @@
 		div.dataTables_scrollFootInner table{
 			margin-top: 0 !important;
 		}
+		.bg-con-warp:nth-child(2) th{
+			text-align: center !important;
+		}
 	</style>
 </head>
 <body>
@@ -133,10 +138,10 @@
 										<label>变更类型</label>
 										<div class="checkbox">
 											<label class="checkbox-inline">
-												<input name="ctype[]" value="1" type="checkbox">A.位置
+												<input name="ctype[]" value="2" type="checkbox">A.数量
 											</label>
 											<label class="checkbox-inline">
-												<input name="ctype[]" value="2" type="checkbox">B.数量
+												<input name="ctype[]" value="1" type="checkbox">B.位置
 											</label>
 											<label class="checkbox-inline">
 												<input name="ctype[]" value="3" type="checkbox">C.结构
@@ -155,11 +160,11 @@
 									<div class="form-group">
 										<label>变更类别 </label>
 										<select class="form-control" name="category">
-											<option value="1">A类变更(设计变更)</option>
-											<option value="2">B类变更(施工措施变更)</option>
-											<option value="3">C类变更(计划变更)</option>
-											<option value="4">D类变更(条件变更)</option>
-											<option value="5">E类变更(新增工程)</option>
+											<option value="1">A类变更</option>
+											<option value="2">B类变更</option>
+											<option value="3">C类变更</option>
+											<option value="4">D类变更</option>
+											<option value="5">E类变更</option>
 										</select>
 									</div>
 									<div class="form-group">
@@ -199,7 +204,7 @@
 							<legend id="qingdan" >
 								<a href="#setting" data-toggle="modal" class="btn btn-default btn-xs pull-right" title="小数位设置"><i class="glyphicon glyphicon-cog"></i> 0.00</a>
 								<span class="glyphicon glyphicon-list-alt"></span> 变更清单&nbsp;&nbsp;<a href="#addlist" class="btn btn-primary btn-xs" data-toggle="modal"><span class="glyphicon glyphicon-plus"></span> 添加清单</a></legend>
-							<table class="table table-striped table-bordered nowrap" id="tablelist" cellspacing="0" width="100%">
+							<table class="table table-striped table-bordered nowrap qd-table" id="tablelist" cellspacing="0" style="width:100%">
 								<thead>
 								<tr><th rowspan="2" class="text-center">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th><th rowspan="2" class="text-center">删除</th></tr>
 								<tr><th class="text-center">数量</th><th class="text-center">金额</th><th class="text-center">数量</th><th class="text-center">金额</th></tr>
@@ -224,13 +229,14 @@
 						<div class="bg-con-warp">
 							<legend id="shenpi"><span class="glyphicon glyphicon-check"></span> 审批流程&nbsp;&nbsp;<a href="#addshenpi" class="btn btn-primary btn-xs" data-toggle="modal"><span class="glyphicon glyphicon-plus"></span> 添加审批人</a></legend>
 							<table class="table table-bordered">
+								<thead>
 								<tr>
-									<td width="100">提交人</td>
-									<td width="250"><h4 class="media-heading">{{userArray.jobs}} {{userArray.name}}</h4>
-										{{userArray.company}}</td>
-									<td width="100"></td>
+									<td width="100"><i class="glyphicon glyphicon-download text-muted"></i> 提交</td>
+									<td width="150"><h4 class="media-heading">{{userArray.name}}</h4>{{userArray.jobs}}</td>
+									<td width="200">{{userArray.email}}<br>{{userArray.company}}</td>
 									<td></td>
 								</tr>
+								</thead>
 								<tbody id="usertableshow">
 
 								</tbody>
@@ -357,14 +363,14 @@
 
 <!--添加审批人-->
 <div class="modal fade" id="addshenpi" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
-	<div class="modal-dialog" role="document">
+	<div class="modal-dialog modal-lg" role="document">
 		<div class="modal-content">
 			<div class="modal-header">
 				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
 				<h4 class="modal-title">添加审批人</h4>
 			</div>
 			<div class="modal-body">
-				<input type="hidden" id="usernamelist" value="{{usernamelist}}">
+				<input type="hidden" id="useridlist" value="{{useridlist}}">
 				<div class="input-group">
 					<input type="text" class="form-control" id="searchname" placeholder="请输入审批人名称">
 						  <span class="input-group-btn">
@@ -377,12 +383,12 @@
 				<div class="row">
 					<!-- loop userlist -->
 					<div class="col-md-3 alert alert-pnone">
-						<div class="radio" data-uid="{{userlist' value.userid}}" data-uname="{{userlist' value.name}}" data-ucompany="{{userlist' value.company}}" data-ujobs="{{userlist' value.jobs}}">
+						<div class="radio" data-uid="{{userlist' value.userid}}" data-uname="{{userlist' value.name}}" data-ucompany="{{userlist' value.company}}" data-ujobs="{{userlist' value.jobs}}" data-uemail="{{userlist' value.email}}">
 							<label>
 								<input type="radio" value="{{userlist' value.userid}}">{{userlist' value.name}}
 							</label>
 							<div>
-								{{userlist' value.jobs}}
+								{{userlist' value.jobs}}<br>{{userlist' value.email}}
 							</div>
 						</div>
 					</div>

+ 55 - 58
protected/view/biangeng-update.html

@@ -22,20 +22,22 @@
 			width: 100%
 		}
 		.allwidth1{
-			width: 15% !important;
-			max-width: 200px !important;
+
 		}
 		.allwidth2{
-			width: 20% !important;
-			max-width: 300px !important;
+
 		}
 		.allwidth3{
-			width: 10% !important;
-			max-width: 150px !important;
+			text-align:right;
+		}
+		.allwidth3 input{
+			text-align:right;
+		}
+		.allwidth5{
+			text-align:center;
 		}
 		.allwidth4{
-			width: 5% !important;
-			max-width: 70px !important;
+			text-align:center;
 		}
 		div.DTFC_LeftFootWrapper table, div.DTFC_RightFootWrapper table{
 			border-top: 1px solid #ddd;
@@ -52,6 +54,9 @@
 		div.dataTables_scrollFootInner table{
 			margin-top: 0 !important;
 		}
+		.bg-con-warp:nth-child(2) th{
+			text-align: center !important;
+		}
 	</style>
 </head>
 <body>
@@ -134,10 +139,10 @@
 										<label>变更类型</label>
 										<div class="checkbox">
 											<label class="checkbox-inline">
-												<input name="ctype[]" value="1" type="checkbox" <!-- if in_phparray(1,{{changeArray.ctype}}) -->checked<!-- endif -->>A.位置
+												<input name="ctype[]" value="2" type="checkbox" <!-- if in_phparray(2,{{changeArray.ctype}}) -->checked<!-- endif -->>A.数量
 											</label>
 											<label class="checkbox-inline">
-												<input name="ctype[]" value="2" type="checkbox" <!-- if in_phparray(2,{{changeArray.ctype}}) -->checked<!-- endif -->>B.数量
+												<input name="ctype[]" value="1" type="checkbox" <!-- if in_phparray(1,{{changeArray.ctype}}) -->checked<!-- endif -->>B.位置
 											</label>
 											<label class="checkbox-inline">
 												<input name="ctype[]" value="3" type="checkbox" <!-- if in_phparray(3,{{changeArray.ctype}}) -->checked<!-- endif -->>C.结构
@@ -156,11 +161,11 @@
 									<div class="form-group">
 										<label>变更类别 </label>
 										<select class="form-control" name="category">
-											<option value="1" <!-- if {{changeArray.category}} == 1 -->selected="selected"<!-- endif -->>A类变更(设计变更)</option>
-											<option value="2" <!-- if {{changeArray.category}} == 2 -->selected="selected"<!-- endif -->>B类变更(施工措施变更)</option>
-											<option value="3" <!-- if {{changeArray.category}} == 3 -->selected="selected"<!-- endif -->>C类变更(计划变更)</option>
-											<option value="4" <!-- if {{changeArray.category}} == 4 -->selected="selected"<!-- endif -->>D类变更(条件变更)</option>
-											<option value="5" <!-- if {{changeArray.category}} == 5 -->selected="selected"<!-- endif -->>E类变更(新增工程)</option>
+											<option value="1" <!-- if {{changeArray.category}} == 1 -->selected="selected"<!-- endif -->>A类变更</option>
+											<option value="2" <!-- if {{changeArray.category}} == 2 -->selected="selected"<!-- endif -->>B类变更</option>
+											<option value="3" <!-- if {{changeArray.category}} == 3 -->selected="selected"<!-- endif -->>C类变更</option>
+											<option value="4" <!-- if {{changeArray.category}} == 4 -->selected="selected"<!-- endif -->>D类变更</option>
+											<option value="5" <!-- if {{changeArray.category}} == 5 -->selected="selected"<!-- endif -->>E类变更</option>
 										</select>
 									</div>
 									<div class="form-group">
@@ -200,7 +205,7 @@
 							<legend id="qingdan" >
 								<a href="#setting" data-toggle="modal" class="btn btn-default btn-xs pull-right" title="小数位设置"><i class="glyphicon glyphicon-cog"></i> 0.00</a>
 								<span class="glyphicon glyphicon-list-alt"></span> 变更清单&nbsp;&nbsp;<a href="#addlist" class="btn btn-primary btn-xs" data-toggle="modal"><span class="glyphicon glyphicon-plus"></span> 添加清单</a></legend>
-							<table id="tablelist" class="table table-striped table-bordered nowrap" cellspacing="0" width="100%">
+							<table id="tablelist" class="table table-striped table-bordered nowrap qd-table" cellspacing="0" style="width: 100%">
 								<thead>
 								<tr><th rowspan="2" class="text-center">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th><th rowspan="2" class="text-center" width="70">删除</th></tr>
 								<tr><th class="text-center">数量</th><th class="text-center">金额</th><th class="text-center">数量</th><th class="text-center">金额</th></tr>
@@ -258,12 +263,35 @@
 						<div class="bg-con-warp">
 							<legend id="shenpi"><span class="glyphicon glyphicon-check"></span> 审批流程&nbsp;&nbsp;<a href="#addshenpi" class="btn btn-primary btn-xs" data-toggle="modal"><span class="glyphicon glyphicon-plus"></span> 添加审批人</a></legend>
 							<table class="table table-bordered">
-								<!-- if {{changeArray.status}} == 'back' -->
+								<thead>
+								<tr>
+									<td width="100"><i class="glyphicon glyphicon-download text-muted"></i> 提交</td>
+									<td width="150"><h4 class="media-heading">{{userArray.name}}</h4>{{userArray.jobs}}</td>
+									<td width="200">{{userArray.email}}<br>{{userArray.company}}</td>
+									<td></td>
+								</tr>
+								</thead>
+								<tbody id="usertableshow">
+								<!-- loop auditlist -->
+								<tr>
+									<td width="100"><!-- if {{auditlist' value.usite}} == 0 --><i class="glyphicon glyphicon-download text-muted"></i> 提交<!-- else --><!-- if {{auditlist' value.usite}} != {{auditlist' value.lastusite}} --><i class="glyphicon glyphicon-arrow-down text-muted"></i> 审批<!-- else --><i class="glyphicon glyphicon-stop text-muted"></i> 终审<!-- endif --><!-- endif --></td>
+									<td width="150"><h4 class="media-heading">{{auditlist' value.name}}</h4>
+										{{auditlist' value.jobs}} </td>
+									<td width="200">{{auditlist' value.email}}<br>{{auditlist' value.company}}</td>
+									<td width=""><a href="javascript:void(0);" class="btn btn-default btn-sm remove-select-audit" uid="{{auditlist' value.uid}}" title="移除审批人"><span class="glyphicon glyphicon-remove text-danger"></span></a></td>
+								</tr>
+								<!-- endloop -->
+								</tbody>
+							</table>
+
+							<!-- if {{changeArray.status}} == 'back' -->
+							<table class="table table-bordered">
 								<!-- loop auditlist2 -->
 								<tr>
-									<td width="100"><!-- if {{auditlist2' value.usite}} == 0 -->提交人<!-- else -->{{auditlist2' value.usite}} 审<!-- endif --></td>
-									<td width="250"><h4 class="media-heading">{{auditlist2' value.jobs}} {{auditlist2' value.name}}</h4>
-										{{auditlist' value.company}}</td>
+									<td width="100"><!-- if {{auditlist2' value.usite}} == 0 --><i class="glyphicon glyphicon-download text-muted"></i> 提交<!-- else --><!-- if {{auditlist2' value.usite}} != {{auditlist2' value.lastusite}} --><i class="glyphicon glyphicon-arrow-down text-muted"></i> 审批<!-- else --><i class="glyphicon glyphicon-stop text-muted"></i> 终审<!-- endif --><!-- endif --></td>
+									<td width="150"><h4 class="media-heading">{{auditlist2' value.name}}</h4>
+										{{auditlist2' value.jobs}} </td>
+									<td width="200">{{auditlist2' value.email}}<br>{{auditlist2' value.company}}</td>
 									<!-- if {{auditlist2' value.usite}} == 0 -->
 									<!-- if {{auditlist2' value.status}} == 'checked' --><td width="100" class="colGreen">上报完成</td><td>{{formatDate(auditlist2' value.sintime)}}<br></td>
 									<!-- elseif {{auditlist2' value.times}} == 0  && {{auditlist2' value.status}} == 'checking' --><td width="100" class="colOrange">上报中</td><td><br></td>
@@ -279,25 +307,8 @@
 									<!-- endif -->
 								</tr>
 								<!-- endloop -->
-								<!-- endif -->
-								<tr>
-									<td width="100">提交人</td>
-									<td width="250"><h4 class="media-heading">{{userArray.jobs}} {{userArray.name}}</h4>
-										{{userArray.company}}</td>
-									<!-- if {{changeArray.status}} == 'back' --><td width="100" class="colOrange">重新上报中</td><!-- else --><td width="100"></td><!-- endif -->
-									<td></td>
-								</tr>
-								<tbody id="usertableshow">
-								<!-- loop auditlist -->
-								<tr>
-									<td width="100">{{auditlist' value.usite}} 审</td>
-									<td width="250"><h4 class="media-heading">{{auditlist' value.jobs}} {{auditlist' value.name}}</h4>
-										{{auditlist' value.company}}</td>
-									<td width="100"></td><td></td>
-								</tr>
-								<!-- endloop -->
-								</tbody>
 							</table>
+							<!-- endif -->
 						</div>
 					</div>
 				</div>
@@ -433,14 +444,14 @@
 
 <!--添加审批人-->
 <div class="modal fade" id="addshenpi" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
-	<div class="modal-dialog" role="document">
+	<div class="modal-dialog modal-lg" role="document">
 		<div class="modal-content">
 			<div class="modal-header">
 				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
 				<h4 class="modal-title">添加审批人</h4>
 			</div>
 			<div class="modal-body">
-				<input type="hidden" id="usernamelist" value="{{usernamelist}}">
+				<input type="hidden" id="useridlist" value="{{useridlist}}">
 				<div class="input-group">
 					<input type="text" class="form-control" id="searchname" placeholder="请输入审批人名称">
 						  <span class="input-group-btn">
@@ -448,43 +459,29 @@
 						  </span>
 				</div>
 				<div class="row" id="searchshow" style="margin-top:25px;">
-					<!-- if !empty({{sauditlist}}) -->
-					<!-- loop sauditlist -->
-					<div class="col-md-3 alert alert-pnone alert-success">
-						<div class="radio" data-uid="{{sauditlist' value.uid}}" data-uname="{{sauditlist' value.name}}" data-ucompany="{{sauditlist' value.company}}" data-ujobs="{{sauditlist' value.jobs}}">
-							<label>
-								<input type="radio" value="{{sauditlist' value.uid}}" checked>{{sauditlist' value.name}}
-							</label>
-							<div>
-								{{sauditlist' value.jobs}}
-							</div>
-						</div>
-					</div>
-					<!-- endloop -->
-					<!-- endif -->
 				</div>
 				<h5>常用审批人</h5>
 				<div class="row">
 					<!-- loop userlist -->
 					<!-- if in_phparray({{userlist' value.userid}},{{changeaudit}}) -->
 					<div class="col-md-3 alert alert-pnone alert-success">
-						<div class="radio" data-uid="{{userlist' value.userid}}" data-uname="{{userlist' value.name}}" data-ucompany="{{userlist' value.company}}" data-ujobs="{{userlist' value.jobs}}">
+						<div class="radio" data-uid="{{userlist' value.userid}}" data-uname="{{userlist' value.name}}" data-ucompany="{{userlist' value.company}}" data-ujobs="{{userlist' value.jobs}}" data-uemail="{{userlist' value.email}}">
 							<label>
 								<input type="radio" value="{{userlist' value.userid}}" checked>{{userlist' value.name}}
 							</label>
 							<div>
-								{{userlist' value.jobs}}
+								{{userlist' value.jobs}}<br>{{userlist' value.email}}
 							</div>
 						</div>
 					</div>
 					<!-- else -->
 					<div class="col-md-3 alert alert-pnone">
-						<div class="radio" data-uid="{{userlist' value.userid}}" data-uname="{{userlist' value.name}}" data-ucompany="{{userlist' value.company}}" data-ujobs="{{userlist' value.jobs}}">
+						<div class="radio" data-uid="{{userlist' value.userid}}" data-uname="{{userlist' value.name}}" data-ucompany="{{userlist' value.company}}" data-ujobs="{{userlist' value.jobs}}" data-uemail="{{userlist' value.email}}">
 							<label>
 								<input type="radio" value="{{userlist' value.userid}}">{{userlist' value.name}}
 							</label>
 							<div>
-								{{userlist' value.jobs}}
+								{{userlist' value.jobs}}<br>{{userlist' value.email}}
 							</div>
 						</div>
 					</div>

+ 17 - 6
protected/view/edit-profile-sms-edit.html

@@ -25,7 +25,7 @@
                 </div>
             </div>
             <div class="form">
-                <form class="form-horizontal">
+                <div class="form-horizontal">
                     <legend>短信通知-修改手机</legend>
                     <div class="form-group">
                         <label class="col-sm-1 control-label">当前手机</label>
@@ -40,11 +40,13 @@
                                                                                                        class="help-block" style="display: none"></span>
                         </div>
                     </div>
-                    <div class="form-group">
+                    <div id="code_error" class="form-group">
                         <label class="col-sm-1 control-label">短信校验码</label>
                         <div class="col-sm-2">
                             <input class="form-control" type="text" id="verifycode" name="verifycode" placeholder="输入验证码" maxlength="11"
                                    class="span2">
+                            <span id="help-inline2"
+                                  class="help-block" style="display: none"></span>
                             <!--<button class="btn">获取验证码</button>-->
                             <!--<button class="btn" disabled>重新获取 60s</button>-->
                         </div>
@@ -60,7 +62,7 @@
                         </div>
                     </div>
                     </fieldset>
-                </form>
+                </div>
             </div>
         </div>
         <!--内容-->
@@ -161,9 +163,18 @@
                 dataType: "json",
                 cache: false,
                 data: {"mobile": $("#mobile").val(), "verifycode": $("#verifycode").val()},
-                url: "{{rootUrl}}user/profile/sms/edit"
-            }).done(function (data) {
-                window.location.reload(true);
+                url: "{{rootUrl}}user/profile/sms/edit",
+                success: function(result){
+                    if(result.code == 400){
+                        $("#code_error").addClass('has-error');
+                        $("#help-inline2").html('短信校验码有误');
+                        $("#help-inline2").show();
+                    }else{
+                        $("#code_error").removeClass('has-error');
+                        $("#help-inline2").hide();
+                        window.location.href = '/user/profile/sms/edit';
+                    }
+                }
             });
         });
     });

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 47 - 26
protected/view/sign-list-all.html


+ 1 - 1
protected/view/sign-view-page.html

@@ -7,7 +7,7 @@
     <meta name=copyright content=smartcost.com.cn>
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
-    <link rel=stylesheet href={{rootUrl}}global/css/style.css?20170828>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
     <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
     <script src={{rootUrl}}global/js/bootstrap.js></script>
     <script src={{rootUrl}}global/js/jl.js></script>