Explorar el Código

添加变更管理开关判断

laiguoran hace 5 años
padre
commit
00b12b7dff

+ 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'] = [];

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 7 - 1
protected/view/w-project.html