소스 검색

添加变更管理开关判断

laiguoran 5 년 전
부모
커밋
00b12b7dff
3개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 0
      protected/class/change.php
  2. 1 0
      protected/controller/ProjectController.php
  3. 7 1
      protected/view/w-project.html

+ 5 - 0
protected/class/change.php

@@ -179,6 +179,11 @@ class Changes
         return $this->__change->update();
     }
 
+    public function getChangeDoingCount($pid)
+    {
+        return $this->__change->count(array('where' => 'pid=? and status in ("uncheck", "checking", "checked")', 'param' => array($pid), 'asArray' => TRUE));
+    }
+
 
     //changeatt
     public function insertChangeAtt($files)

+ 1 - 0
protected/controller/ProjectController.php

@@ -142,6 +142,7 @@ class ProjectController extends DooController
                 }
                 $this->data['pros'][$key]['bcontracttotal'] = number_format($this->data['pros'][$key]['contracttotal'], 2, '.', ',');
                 $this->data['pros'][$key]['bchangTotal'] = number_format($this->data['pros'][$key]['changTotal'], 2, '.', ',');
+                $this->data['pros'][$key]['change_canstop'] = $this->change->getChangeDoingCount($value['pid']);
             }
         } else {
             $this->data['pros'] = [];

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 7 - 1
protected/view/w-project.html