|
@@ -25,7 +25,7 @@ Doo::loadClass('change');
|
|
class SProjectController extends DooController
|
|
class SProjectController extends DooController
|
|
{
|
|
{
|
|
|
|
|
|
- private $aconfig,$data, $sign, $concern, $auth, $change, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $measureauditact, $itemmeasurenum, $itemfle, $att;
|
|
|
|
|
|
+ private $aconfig,$data, $sign, $concern, $auth, $change, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $measureauditact, $itemmeasurenum, $itemfle, $att, $statusArray = array('uncheck' => '未审批', 'checking' => '审批中', 'checked' => '已审批', 'checkno' => '未通过');
|
|
|
|
|
|
public function beforeRun($resource, $action)
|
|
public function beforeRun($resource, $action)
|
|
{
|
|
{
|
|
@@ -362,6 +362,8 @@ class SProjectController extends DooController
|
|
$this->data['MeasureArray'][$key]['lessTotal'] = 0;
|
|
$this->data['MeasureArray'][$key]['lessTotal'] = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
|
|
|
|
+ $this->data['mpid'] = $numStatusArray['mpid'];
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
// 获取当前合同段的期数
|
|
// 获取当前合同段的期数
|
|
@@ -565,7 +567,8 @@ class SProjectController extends DooController
|
|
|
|
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
- $this->data['mpid'] = $this->params['mpid'];
|
|
|
|
|
|
+ $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
|
|
|
|
+ $this->data['mpid'] = $numStatusArray['mpid'];
|
|
$this->data['userid'] = $this->params['userid'];
|
|
$this->data['userid'] = $this->params['userid'];
|
|
$this->data['num'] = $this->params['numpname'];
|
|
$this->data['num'] = $this->params['numpname'];
|
|
$this->data['pager'] = $pager->output;
|
|
$this->data['pager'] = $pager->output;
|
|
@@ -669,7 +672,8 @@ class SProjectController extends DooController
|
|
}
|
|
}
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
- $this->data['mpid'] = $this->params['mpid'];
|
|
|
|
|
|
+ $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
|
|
|
|
+ $this->data['mpid'] = $numStatusArray['mpid'];
|
|
$this->data['pager'] = $pager->output;
|
|
$this->data['pager'] = $pager->output;
|
|
$this->render('s-project-section-files-recover', $this->data, TRUE);
|
|
$this->render('s-project-section-files-recover', $this->data, TRUE);
|
|
}
|
|
}
|
|
@@ -832,7 +836,8 @@ class SProjectController extends DooController
|
|
$this->data['phasenolist'] = isset($phasenolist) ? $phasenolist : '';
|
|
$this->data['phasenolist'] = isset($phasenolist) ? $phasenolist : '';
|
|
$this->data['pager'] = $pager->output;
|
|
$this->data['pager'] = $pager->output;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
|
|
|
|
+ $this->data['mpid'] = $numStatusArray['mpid'];
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pid'] = $this->params['pid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
$this->render('s-project-section-intermediate', $this->data, TRUE);
|
|
$this->render('s-project-section-intermediate', $this->data, TRUE);
|
|
@@ -1031,6 +1036,154 @@ class SProjectController extends DooController
|
|
$this->render('sign-view-page', $this->data, TRUE);
|
|
$this->render('sign-view-page', $this->data, TRUE);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 审批流程页
|
|
|
|
+ public function proReport() {
|
|
|
|
+ $this->data['currproArray'] = $this->data['allproArray'] = NULL;
|
|
|
|
+ $proArray = $this->actmeasure->getGroupProject($this->auth->getUid());
|
|
|
|
+ foreach ($proArray as $v) {
|
|
|
|
+ $pidArray[] = $v['pid'];
|
|
|
|
+ }
|
|
|
|
+ $pidstr = implode(',', $pidArray);
|
|
|
|
+ // 项目名称
|
|
|
|
+ $allproArray = $this->project->getFewRow($pidstr);
|
|
|
|
+ // 面包屑导航项目
|
|
|
|
+ foreach ($allproArray as $kk => $vv) {
|
|
|
|
+ if ($vv['pid'] == $this->params['pid']) {
|
|
|
|
+ $this->data['currproArray'] = $vv;
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['allproArray'][] = $vv;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 面包屑导航合同
|
|
|
|
+ $conArray = $this->contractact->getAll();
|
|
|
|
+ $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
|
|
|
|
+ if (isset($measureArray['stid'])) {
|
|
|
|
+ foreach ($conArray as $kkk => $vvv) {
|
|
|
|
+ if ($vvv['stid'] == $measureArray['stid']) {
|
|
|
|
+ $this->data['currconArray'] = $vvv;
|
|
|
|
+ } else {
|
|
|
|
+ if ($vvv['pid'] == $this->params['pid'])
|
|
|
|
+ $this->data['allconArray'][] = $vvv;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['currconArray'] = $this->data['allconArray'] = NULL;
|
|
|
|
+ }
|
|
|
|
+ // 面包屑导航标段
|
|
|
|
+ $this->data['curractmeasureArray'] = NULL;
|
|
|
|
+ $this->data['allactmeasureArray'] = [];
|
|
|
|
+ $actmeasureArray = $this->actmeasure->getRowUser($this->auth->getUid());
|
|
|
|
+ foreach ($actmeasureArray as $kkkk => $vvvv) {
|
|
|
|
+ if ($vvvv['stid'] == $measureArray['stid']) {
|
|
|
|
+ if (($vvvv['pmid'] == $this->params['pmid'])) {
|
|
|
|
+ $this->data['curractmeasureArray'] = $vvvv;
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['allactmeasureArray'][] = $vvvv;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 期数列表
|
|
|
|
+ $tmpArray = $this->numofperact->getGroupByLastOne2($this->params['pmid']);
|
|
|
|
+ foreach ($tmpArray as $k => $v) {
|
|
|
|
+ $intTime = $this->numofperact->getMaxTimes($v['pmid'], $v['numpname'])['times'];
|
|
|
|
+ $nfArray[] = $this->numofperact->getRow($v['pmid'], $v['numpname'], $intTime);
|
|
|
|
+ }
|
|
|
|
+ foreach ($nfArray as $k => $v) {
|
|
|
|
+ if ($v['mpid'] == $this->params['mpid']) {
|
|
|
|
+ $this->data['mpid'] = $v['mpid'];
|
|
|
|
+ $this->data['MeasureArray2'][] = $v;
|
|
|
|
+ $this->data['currnum'] = $v['numpname'];
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['numArray'][] = $v;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
|
|
|
|
+ foreach ($this->data['MeasureArray2'] as $key => $value) {
|
|
|
|
+ if ($value['mpid'] == $this->params['mpid']) {
|
|
|
|
+ $this->data['MeasureArray2'][$key]['currstatus'] = $this->statusArray[$value['currstatus']];
|
|
|
|
+ if ($measureArray['contracttotal'] > ($value['currdone'] > 0)) {
|
|
|
|
+ $this->data['MeasureArray2'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['MeasureArray2'][$key]['lessTotal'] = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ $lastRowArray = $this->numofperact->getLastNew2($this->params['pmid']);
|
|
|
|
+ $maxTimes = $this->numofperact->getMaxTimes($lastRowArray['pmid'], $lastRowArray['numpname']);
|
|
|
|
+// $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
|
|
|
|
+// $maxtimez = $this->measureauditact->getRowGroupByTimes($this->params['mpid']);
|
|
|
|
+ $maxtimez = $this->numofperact->getRowByMpid($this->params['mpid']);
|
|
|
|
+ $auditUserArray = $this->measureauditact->getRowByMpidTimes($this->params['mpid'], $maxtimez['numpname'], $maxtimez['times']);
|
|
|
|
+ $auditArray = $this->measureauditact->getLastNewRowInfo($lastRowArray['pmid'], $lastRowArray['numpname'], $this->auth->getUid());
|
|
|
|
+ $this->data['pmid'] = $lastRowArray['pmid'];
|
|
|
|
+ $this->data['numpname'] = $lastRowArray['numpname'];
|
|
|
|
+ $this->data['times'] = $lastRowArray['times'];
|
|
|
|
+ $this->data['pid'] = $this->params['pid'];
|
|
|
|
+ $firstUser = 0;
|
|
|
|
+ foreach ($auditUserArray as $key => $value) {
|
|
|
|
+ $strAvatar = $this->auth->getAvatar($value['auditoruid']);
|
|
|
|
+ $i = $key + 1;
|
|
|
|
+ if ($value['auditoruid'] == $this->auth->getUid()) {
|
|
|
|
+ $this->data['mastatus'] = $value['mastatus'];
|
|
|
|
+ $this->data['maid'] = $value['maid'];
|
|
|
|
+ if($key == 0){
|
|
|
|
+ $firstUser = 1;
|
|
|
|
+ }else{
|
|
|
|
+ $this->data['lastUserID'] = $auditUserArray[$key-1]['auditoruid'];
|
|
|
|
+ $this->data['lastUsername'] = $this->profile->getProWithUid($auditUserArray[$key-1]['auditoruid'])['name'];
|
|
|
|
+ $this->data['lastUserCompany'] = $this->profile->getProWithUid($auditUserArray[$key-1]['auditoruid'])['company'];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if ($value['mastatus'] == 'uncheck') {
|
|
|
|
+ $statuStr = '';
|
|
|
|
+ $statucolorStr = '';
|
|
|
|
+ $statushtml = '<li title="" class=""><img src="' . $strAvatar . '"></li>';
|
|
|
|
+ }
|
|
|
|
+ if ($value['mastatus'] == 'checking') {
|
|
|
|
+ $statuStr = '<h4 class="colOrange">审批中</h4>';
|
|
|
|
+ $statucolorStr = 'colOrange';
|
|
|
|
+ $statushtml = '<li title="审批中" class="wait"><span data-icon="k" aria-hidden="true"></span> <img src="' . $strAvatar . '"></li>';
|
|
|
|
+ }
|
|
|
|
+ if ($value['mastatus'] == 'checked') {
|
|
|
|
+ $statuStr = '<h4 class="colGreen">审批完成(' . date('Y-m-d', $value['audittime']) . ')</h4>';
|
|
|
|
+ $statucolorStr = 'colGreen';
|
|
|
|
+ $statushtml = '<li title="审批通过" class="pass"><span data-icon="d" aria-hidden="true"></span><img src="' . $strAvatar . '"></li>';
|
|
|
|
+ }
|
|
|
|
+ if ($value['mastatus'] == 'checkno') {
|
|
|
|
+ $statuStr = '<h4 class="colRed">审批不通过(' . date('Y-m-d', $value['audittime']) . ')</h4>';
|
|
|
|
+ $statucolorStr = 'colRed';
|
|
|
|
+ $statushtml = '<li title="审批不通过" class="notpass"><span data-icon="e" aria-hidden="true"></span><img src="' . $strAvatar . '"></li>';
|
|
|
|
+ }
|
|
|
|
+ $auditUserArray[$key]['statuStr'] = $statuStr;
|
|
|
|
+ $auditUserArray[$key]['statucolorStr'] = $statucolorStr;
|
|
|
|
+ $auditUserArray[$key]['statushtml'] = $statushtml;
|
|
|
|
+ $auditUserArray[$key]['k'] = $i;
|
|
|
|
+ $auditUserArray[$key]['name'] = $this->profile->getProWithUid($value['auditoruid'])['name'];
|
|
|
|
+ }
|
|
|
|
+ $strAvatar = $this->auth->getAvatar($measureArray['uid']);
|
|
|
|
+ $orginArray['avatar'] = '<img src="' . $strAvatar . '"></li>';
|
|
|
|
+ $orginArray['name'] = $this->profile->getProWithUid($measureArray['uid'])['name'];
|
|
|
|
+
|
|
|
|
+ // 获取原报时间
|
|
|
|
+ // 利用mpid和uid获取原报人当前期数下上传的第一份文件时间,即为原报时间
|
|
|
|
+// $attfileArray = $this->attfile->getFirstFile($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['times']);
|
|
|
|
+ $attfileArray = $this->attfile->getFirstFile($lastRowArray['pmid'], $maxtimez['numpname'], $maxtimez['times']);
|
|
|
|
+
|
|
|
|
+ $orginArray['time'] = date('Y-m-d', $attfileArray['intime']);
|
|
|
|
+ $this->data['auditArray'] = $auditUserArray;
|
|
|
|
+ $this->data['orginArray'] = $orginArray;
|
|
|
|
+ $this->data['pmid'] = $this->params['pmid'];
|
|
|
|
+ $this->data['pid'] = $this->params['pid'];
|
|
|
|
+ $this->data['mpid'] = $this->params['mpid'];
|
|
|
|
+ $this->data['firstUser'] = $firstUser;
|
|
|
|
+// var_dump($this->data);
|
|
|
|
+// exit;
|
|
|
|
+ $this->render('s-project-section-report', $this->data, TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
function is_pjax(){
|
|
function is_pjax(){
|
|
return array_key_exists('HTTP_X_PJAX', $_SERVER) && $_SERVER['HTTP_X_PJAX'] === 'true';
|
|
return array_key_exists('HTTP_X_PJAX', $_SERVER) && $_SERVER['HTTP_X_PJAX'] === 'true';
|
|
}
|
|
}
|