|  | @@ -64,6 +64,21 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |          //获取需要您签署的数目
 | 
	
		
			
				|  |  |          if($this->data['signSwitch'] > 0)
 | 
	
		
			
				|  |  |              $this->data['needSignNum'] = $this->sign->getNeedSignNumbyUid($this->auth->getUid()) != 0 ? $this->sign->getNeedSignNumbyUid($this->auth->getUid()) : '';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //获取桌面版本
 | 
	
		
			
				|  |  | +        $this->getsoftware();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //草图入口
 | 
	
		
			
				|  |  | +        $this->data['imediateSwitch'] = $this->aconfig->getOne(array('select' => 'imediateswitch', 'asArray' => TRUE))['imediateswitch'];
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    function getsoftware(){
 | 
	
		
			
				|  |  | +        $StrJson = ($this->aconfig->getOne(array('select' => 'upgradeinfo', 'asArray' => TRUE))['upgradeinfo']);
 | 
	
		
			
				|  |  | +        $upgradeinfo = json_decode($StrJson, true);
 | 
	
		
			
				|  |  | +        if ($upgradeinfo) {
 | 
	
		
			
				|  |  | +            $this->data['version'] = $upgradeinfo['version'];
 | 
	
		
			
				|  |  | +            $this->data['download'] = $upgradeinfo['download'];
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public function beforeRun($resource, $action)
 | 
	
	
		
			
				|  | @@ -103,6 +118,7 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  $this->data['proArray'][$key]['bcontracttotal'] = number_format($this->data['proArray'][$key]['contracttotal'], 2, '.', ',');
 | 
	
		
			
				|  |  |                  $this->data['proArray'][$key]['bchangTotal'] = number_format($this->data['proArray'][$key]['changTotal'], 2, '.', ',');
 | 
	
		
			
				|  |  | +                $this->data['proArray'][$key]['index'] = $key%8+1;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              $this->data['proArray'] = array();
 | 
	
	
		
			
				|  | @@ -172,7 +188,7 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          $datatmp = $this->measureauditact->getMyAuditStatus2($numStatusArray['pmid'], $numStatusArray['numpname'], $numStatusArray['times'], $this->auth->getUid());
 | 
	
		
			
				|  |  |                          if ($datatmp && ($datatmp['mastatus'] == 'checking')) {
 | 
	
		
			
				|  |  | -                            $buttonhtml = '<a class="btn btn-warning btn-small" href="/rproject/' . $this->params['pid'] . '/section/' . $v['pmid'] . '/report/' . $numStatusArray['mpid'] . '">开始审批</a>';
 | 
	
		
			
				|  |  | +                            $buttonhtml = '<a class="btn btn-warning btn-sm" href="/rproject/' . $this->params['pid'] . '/section/' . $v['pmid'] . '/report/' . $numStatusArray['mpid'] . '">开始审批</a>';
 | 
	
		
			
				|  |  |                          } else {
 | 
	
		
			
				|  |  |                              $buttonhtml = '(<span class="colOrange">' . $this->statusArray[$numStatusArray['currstatus']] . '</span>)';
 | 
	
		
			
				|  |  |                          }
 | 
	
	
		
			
				|  | @@ -182,9 +198,9 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |                                      <td class="taR">¥' . number_format($v['contracttotal'], 2, '.', ',') . '</td>
 | 
	
		
			
				|  |  |                                      <td>
 | 
	
		
			
				|  |  |                                          <div class="progress">
 | 
	
		
			
				|  |  | -                                        <div class="bar bar-success" style="width: ' . $dispstopnowtotal . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="截止上期完成:¥' . $nstopnowtotal . '">' . $dispstopnowtotal . '</div>
 | 
	
		
			
				|  |  | -                                        <div class="bar" style="width:' . $dispcurrdone . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="本期完成:¥' . $ncurrdone . '">' . $dispcurrdone . '</div>
 | 
	
		
			
				|  |  | -                                        <div class="bar bar-gary" style="width:' . $dispnowtotal . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="未完成:¥' . $nnowtotal . '">' . $dispnowtotal . '</div>
 | 
	
		
			
				|  |  | +                                        <div class="progress-bar progress-bar-success" style="width: ' . $dispstopnowtotal . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="截止上期完成:¥' . $nstopnowtotal . '">' . $dispstopnowtotal . '</div>
 | 
	
		
			
				|  |  | +                                        <div class="progress-bar" style="width:' . $dispcurrdone . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="本期完成:¥' . $ncurrdone . '">' . $dispcurrdone . '</div>
 | 
	
		
			
				|  |  | +                                        <div class="progress-bar progress-bar-gary" style="width:' . $dispnowtotal . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="未完成:¥' . $nnowtotal . '">' . $dispnowtotal . '</div>
 | 
	
		
			
				|  |  |                                          </div>
 | 
	
		
			
				|  |  |                                      </td>
 | 
	
		
			
				|  |  |                                      </tr>';
 | 
	
	
		
			
				|  | @@ -295,16 +311,14 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 面包屑导航项目
 | 
	
		
			
				|  |  |          $this->data['currproArray'] = $this->data['allproArray'] = NULL;
 | 
	
		
			
				|  |  | -        $this->data['pmid'] = $this->params['pmid'];
 | 
	
		
			
				|  |  | -        $allproArray = $this->project->getAll();
 | 
	
		
			
				|  |  | -        foreach ($allproArray as $kk => $vv) {
 | 
	
		
			
				|  |  | -            if ($vv['pid'] == $this->params['pid']) {
 | 
	
		
			
				|  |  | -                $this->data['currproArray'] = $vv;
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                $this->data['allproArray'][] = $vv;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($mpidArray as $k1 => $v1) {
 | 
	
		
			
				|  |  | +            if ($v1['pid'] != $this->params['pid'])
 | 
	
		
			
				|  |  | +                $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -// 面包屑导航合同
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
 | 
	
		
			
				|  |  | +        // 面包屑导航合同
 | 
	
		
			
				|  |  |          $conArray = $this->contractact->getAll();
 | 
	
		
			
				|  |  |          $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
 | 
	
		
			
				|  |  |          if (isset($measureArray['stid'])) {
 | 
	
	
		
			
				|  | @@ -319,16 +333,22 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              $this->data['currconArray'] = $this->data['allconArray'] = NULL;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -// 面包屑导航标段
 | 
	
		
			
				|  |  | +        // 面包屑导航标段
 | 
	
		
			
				|  |  |          $this->data['curractmeasureArray'] = NULL;
 | 
	
		
			
				|  |  |          $this->data['allactmeasureArray'] = [];
 | 
	
		
			
				|  |  | +        $auditArray = $this->measureauditact->getUserPmid($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($auditArray as $key => $value) {
 | 
	
		
			
				|  |  | +            $pmidArray[] = $value['pmid'];
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  |          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;
 | 
	
		
			
				|  |  | +                if(in_array($vvvv['pmid'],$pmidArray)) {
 | 
	
		
			
				|  |  | +                    if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
		
			
				|  |  | +                        $this->data['curractmeasureArray'] = $vvvv;
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        $this->data['allactmeasureArray'][] = $vvvv;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -410,16 +430,14 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 面包屑导航项目
 | 
	
		
			
				|  |  |          $this->data['currproArray'] = $this->data['allproArray'] = NULL;
 | 
	
		
			
				|  |  | -        $this->data['pmid'] = $this->params['pmid'];
 | 
	
		
			
				|  |  | -        $allproArray = $this->project->getAll();
 | 
	
		
			
				|  |  | -        foreach ($allproArray as $kk => $vv) {
 | 
	
		
			
				|  |  | -            if ($vv['pid'] == $this->params['pid']) {
 | 
	
		
			
				|  |  | -                $this->data['currproArray'] = $vv;
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                $this->data['allproArray'][] = $vv;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +        $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($mpidArray as $k1 => $v1) {
 | 
	
		
			
				|  |  | +            if ($v1['pid'] != $this->params['pid'])
 | 
	
		
			
				|  |  | +                $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -// 面包屑导航合同
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 面包屑导航合同
 | 
	
		
			
				|  |  |          $conArray = $this->contractact->getAll();
 | 
	
		
			
				|  |  |          $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
 | 
	
		
			
				|  |  |          if (isset($measureArray['stid'])) {
 | 
	
	
		
			
				|  | @@ -434,16 +452,22 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              $this->data['currconArray'] = $this->data['allconArray'] = NULL;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -// 面包屑导航标段
 | 
	
		
			
				|  |  | +        // 面包屑导航标段
 | 
	
		
			
				|  |  |          $this->data['curractmeasureArray'] = NULL;
 | 
	
		
			
				|  |  |          $this->data['allactmeasureArray'] = [];
 | 
	
		
			
				|  |  | +        $auditArray = $this->measureauditact->getUserPmid($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($auditArray as $key => $value) {
 | 
	
		
			
				|  |  | +            $pmidArray[] = $value['pmid'];
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  |          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;
 | 
	
		
			
				|  |  | +                if(in_array($vvvv['pmid'],$pmidArray)) {
 | 
	
		
			
				|  |  | +                    if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
		
			
				|  |  | +                        $this->data['curractmeasureArray'] = $vvvv;
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        $this->data['allactmeasureArray'][] = $vvvv;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -596,15 +620,53 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |          if (!isset($numStatusArray['currstatus'])) {
 | 
	
		
			
				|  |  |              $numStatusArray['currstatus'] = 'uncheck';
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        // 项目名称
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 面包屑导航项目
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->data['allproArray'] = NULL;
 | 
	
		
			
				|  |  |          $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
 | 
	
		
			
				|  |  |          foreach ($mpidArray as $k1 => $v1) {
 | 
	
		
			
				|  |  |              if ($v1['pid'] != $this->params['pid'])
 | 
	
		
			
				|  |  |                  $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
 | 
	
		
			
				|  |  | -        $this->data['MeasureArray'] = $this->numofperact->getGroupByLastOne($this->params['pmid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 面包屑导航合同
 | 
	
		
			
				|  |  | +        $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'] = [];
 | 
	
		
			
				|  |  | +        $auditArray = $this->measureauditact->getUserPmid($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($auditArray as $key => $value) {
 | 
	
		
			
				|  |  | +            $pmidArray[] = $value['pmid'];
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  | +        foreach ($actmeasureArray as $kkkk => $vvvv) {
 | 
	
		
			
				|  |  | +            if ($vvvv['stid'] == $measureArray['stid']) {
 | 
	
		
			
				|  |  | +                if(in_array($vvvv['pmid'],$pmidArray)) {
 | 
	
		
			
				|  |  | +                    if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
		
			
				|  |  | +                        $this->data['curractmeasureArray'] = $vvvv;
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        $this->data['allactmeasureArray'][] = $vvvv;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $this->data['MeasureArray'] = $this->numofperact->getGroupByLastOne($this->params['pmid']);
 | 
	
		
			
				|  |  | +//        $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
 | 
	
		
			
				|  |  |          foreach ($this->data['MeasureArray'] as $key => $value) {
 | 
	
		
			
				|  |  |              if ($measureArray['contracttotal'] > $value['currdone'] && $value['currdone'] > 0) {
 | 
	
		
			
				|  |  |                  $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
 | 
	
	
		
			
				|  | @@ -620,7 +682,49 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public function proReport()
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  | -        // 面包屑导航
 | 
	
		
			
				|  |  | +        // 面包屑导航项目
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->data['allproArray'] = NULL;
 | 
	
		
			
				|  |  | +        $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($mpidArray as $k1 => $v1) {
 | 
	
		
			
				|  |  | +            if ($v1['pid'] != $this->params['pid'])
 | 
	
		
			
				|  |  | +                $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 面包屑导航合同
 | 
	
		
			
				|  |  | +        $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'] = [];
 | 
	
		
			
				|  |  | +        $auditArray = $this->measureauditact->getUserPmid($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($auditArray as $key => $value) {
 | 
	
		
			
				|  |  | +            $pmidArray[] = $value['pmid'];
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  | +        foreach ($actmeasureArray as $kkkk => $vvvv) {
 | 
	
		
			
				|  |  | +            if ($vvvv['stid'] == $measureArray['stid']) {
 | 
	
		
			
				|  |  | +                if(in_array($vvvv['pmid'],$pmidArray)) {
 | 
	
		
			
				|  |  | +                    if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
		
			
				|  |  | +                        $this->data['curractmeasureArray'] = $vvvv;
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        $this->data['allactmeasureArray'][] = $vvvv;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 期数列表
 | 
	
	
		
			
				|  | @@ -812,6 +916,205 @@ class RProjectController extends DooController
 | 
	
		
			
				|  |  |              return $this->sms->sendSms($mobile, $text);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /*
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  | +     * 中间计量表草图列表
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public function proSectionInterMediate(){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //草图功能开关控制
 | 
	
		
			
				|  |  | +        if($this->data['imediateSwitch'] == 0){
 | 
	
		
			
				|  |  | +            exit('中间计量表草图添加功能未启用...');
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 面包屑导航项目
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->data['allproArray'] = NULL;
 | 
	
		
			
				|  |  | +        $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($mpidArray as $k1 => $v1) {
 | 
	
		
			
				|  |  | +            if ($v1['pid'] != $this->params['pid'])
 | 
	
		
			
				|  |  | +                $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 面包屑导航合同
 | 
	
		
			
				|  |  | +        $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'] = [];
 | 
	
		
			
				|  |  | +        $auditArray = $this->measureauditact->getUserPmid($this->auth->getUid());
 | 
	
		
			
				|  |  | +        foreach ($auditArray as $key => $value) {
 | 
	
		
			
				|  |  | +            $pmidArray[] = $value['pmid'];
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  | +        foreach ($actmeasureArray as $kkkk => $vvvv) {
 | 
	
		
			
				|  |  | +            if ($vvvv['stid'] == $measureArray['stid']) {
 | 
	
		
			
				|  |  | +                if(in_array($vvvv['pmid'],$pmidArray)) {
 | 
	
		
			
				|  |  | +                    if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
		
			
				|  |  | +                        $this->data['curractmeasureArray'] = $vvvv;
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        $this->data['allactmeasureArray'][] = $vvvv;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        Doo::loadHelper('DooPager');
 | 
	
		
			
				|  |  | +        $pagestr = '';
 | 
	
		
			
				|  |  | +        $sqlstr = ' 1';
 | 
	
		
			
				|  |  | +        $this->data['phaseno'] = '';
 | 
	
		
			
				|  |  | +        $this->data['nosign'] = '';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //获取项目信息
 | 
	
		
			
				|  |  | +        $searchsql = 'isinter=3';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if(isset($this->params['pid']) && is_numeric($this->params['pid'])){
 | 
	
		
			
				|  |  | +            $pagestr .= '/'.$this->params['pid'];
 | 
	
		
			
				|  |  | +            $sqlstr .= ' and project='.$this->params['pid'];
 | 
	
		
			
				|  |  | +            //获取标段信息
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if(isset($this->params['pmid']) && is_numeric($this->params['pmid'])){
 | 
	
		
			
				|  |  | +                $pagestr .= '/section/'.$this->params['pmid'];
 | 
	
		
			
				|  |  | +                $sqlstr .= ' and tender='.$this->params['pmid'];
 | 
	
		
			
				|  |  | +                //获取期数信息
 | 
	
		
			
				|  |  | +                $phasenolist = $this->sign->getSignGroupByPhaseno($this->params['pmid'],$searchsql);
 | 
	
		
			
				|  |  | +                if(!empty($phasenolist)){
 | 
	
		
			
				|  |  | +                    foreach($phasenolist as $pk => $pv){
 | 
	
		
			
				|  |  | +                        $phasenolist[$pk]['numpname'] = $pv['phaseno'];
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                if(isset($this->params['mpid']) && is_numeric($this->params['mpid'])){
 | 
	
		
			
				|  |  | +                    $this->data['phaseno'] = $this->params['mpid'];
 | 
	
		
			
				|  |  | +                    $pagestr .= '/phaseno/'.$this->params['mpid'];
 | 
	
		
			
				|  |  | +                    $sqlstr .= ' and phaseno='.$this->params['mpid'];
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $totalArchive = $this->sign->getSignNum($sqlstr.' and '.$searchsql);
 | 
	
		
			
				|  |  | +        $pager = new DooPager(Doo::conf()->APP_URL . 'rproject'.$pagestr.'/intermediate/page', $totalArchive, 10, 100);
 | 
	
		
			
				|  |  | +        $pager->setCss('', 'disabled', 'active');
 | 
	
		
			
				|  |  | +        if (isset($this->params['pindex']))
 | 
	
		
			
				|  |  | +            $pager->paginate(intval($this->params['pindex']));
 | 
	
		
			
				|  |  | +        else
 | 
	
		
			
				|  |  | +            $pager->paginate(1);
 | 
	
		
			
				|  |  | +        if ($pager->limit != ' -10,10')
 | 
	
		
			
				|  |  | +            $list = $this->sign->getSignList($sqlstr.' and '.$searchsql,$pager->limit);
 | 
	
		
			
				|  |  | +        if(isset($list) && !empty($list)){
 | 
	
		
			
				|  |  | +            foreach($list as $k => $v){
 | 
	
		
			
				|  |  | +                //获取项目名,标段名,标段期数
 | 
	
		
			
				|  |  | +                $project = $this->project->getRowByPid($v['project']);
 | 
	
		
			
				|  |  | +                $tender = $this->actmeasure->getRowByPmid($v['tender']);
 | 
	
		
			
				|  |  | +//                $phaseno = $this->numofperact->getCurrStatus($v['phaseno']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $list[$k]['project'] = $project['pname'];
 | 
	
		
			
				|  |  | +                $list[$k]['tender'] = $tender['pmname'];
 | 
	
		
			
				|  |  | +//                $list[$k]['phaseno'] = $phaseno['numpname'];
 | 
	
		
			
				|  |  | +                $list[$k]['ownname'] = $this->auth->getName($v['ownuid']);
 | 
	
		
			
				|  |  | +                $list[$k]['auditname'] = $this->auth->getName($v['audituid']);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $this->data['list'] = isset($list) ? $list : '';
 | 
	
		
			
				|  |  | +        $this->data['phasenolist'] = isset($phasenolist) ? $phasenolist : '';
 | 
	
		
			
				|  |  | +        $this->data['pager'] = $pager->output;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
 | 
	
		
			
				|  |  | +        if (!isset($numStatusArray['currstatus'])) {
 | 
	
		
			
				|  |  | +            $numStatusArray['currstatus'] = 'uncheck';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $this->data['pid'] = $this->params['pid'];
 | 
	
		
			
				|  |  | +        $this->data['pmid'] = $this->params['pmid'];
 | 
	
		
			
				|  |  | +        $this->data['mpid'] = $numStatusArray['mpid'];
 | 
	
		
			
				|  |  | +        $this->render('r-project-section-intermediate', $this->data, TRUE);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  | +     * 中间计量表视图
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public function signView()
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +        //草图功能开关控制
 | 
	
		
			
				|  |  | +        if($this->data['imediateSwitch'] == 0){
 | 
	
		
			
				|  |  | +            exit('中间计量表草图添加功能未启用...');die;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if(!isset($this->params['sid']) || !is_numeric($this->params['sid'])){
 | 
	
		
			
				|  |  | +            exit('没有报表参数');
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //获取报表信息
 | 
	
		
			
				|  |  | +        $signmsg = $this->sign->getOneSignbysid($this->params['sid']);
 | 
	
		
			
				|  |  | +        if(empty($signmsg) || $signmsg['isinter'] != 3){
 | 
	
		
			
				|  |  | +            exit('不存在此中间计量表');
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $backurl = '/rproject/'.$signmsg['project'].'/section/'.$signmsg['tender'].'/intermediate';
 | 
	
		
			
				|  |  | +        //获取项目名,标段名,标段期数
 | 
	
		
			
				|  |  | +        $project = $this->project->getRowByPid($signmsg['project']);
 | 
	
		
			
				|  |  | +        $tender = $this->actmeasure->getRowByPmid($signmsg['tender']);
 | 
	
		
			
				|  |  | +//        $phaseno = $this->numofperact->getCurrStatus($signmsg['phaseno']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $signmsg['project'] = $project['pname'];
 | 
	
		
			
				|  |  | +        $signmsg['tender'] = $tender['pmname'];
 | 
	
		
			
				|  |  | +//        $signmsg['phaseno'] = $phaseno['numpname'];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //获取签署人列表
 | 
	
		
			
				|  |  | +        $signauditlist = $this->sign->getSignAuditList($this->params['sid']);
 | 
	
		
			
				|  |  | +        if(!empty($signauditlist)){
 | 
	
		
			
				|  |  | +            foreach($signauditlist as $k => $v){
 | 
	
		
			
				|  |  | +                //获取签署人头像
 | 
	
		
			
				|  |  | +                $signauditlist[$k]['index'] = $k+1;
 | 
	
		
			
				|  |  | +                $signauditlist[$k]['avatar'] = $this->auth->getAvatar($v['audituid']);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //获取报表图片
 | 
	
		
			
				|  |  | +        $maxwidth = 794; //默认图片最大宽度   a4
 | 
	
		
			
				|  |  | +        $maxheight = 1123; //默认图片最大高度  a4
 | 
	
		
			
				|  |  | +        if(!empty($signmsg['widhei'])){
 | 
	
		
			
				|  |  | +            $widhei = explode('_', $signmsg['widhei']);
 | 
	
		
			
				|  |  | +            $style = $widhei[0].'mm '.$widhei[1].'mm';
 | 
	
		
			
				|  |  | +        }else{
 | 
	
		
			
				|  |  | +            $style = '210mm 297mm';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $signattlist = $this->sign->getSignAttList($this->params['sid']);
 | 
	
		
			
				|  |  | +        if(!empty($signattlist)){
 | 
	
		
			
				|  |  | +            foreach($signattlist as $sak => $sav){
 | 
	
		
			
				|  |  | +                $signattlist[$sak]['auditatt'] = $this->sign->getSignAuditAttList($sav['said']);
 | 
	
		
			
				|  |  | +                if($sak == 0){
 | 
	
		
			
				|  |  | +                    $imgmsg = getimagesize(Doo::conf()->APP_URL.$sav['filepath']);
 | 
	
		
			
				|  |  | +                    $maxwidth = $imgmsg[0];
 | 
	
		
			
				|  |  | +                    $maxheight = $imgmsg[1];
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $this->data['signmsg'] = $signmsg;
 | 
	
		
			
				|  |  | +        $this->data['auditlist'] = $signauditlist;
 | 
	
		
			
				|  |  | +        $this->data['attlist'] = $signattlist;
 | 
	
		
			
				|  |  | +        $this->data['backurl'] = $backurl;
 | 
	
		
			
				|  |  | +        $this->data['maxwidth'] = $maxwidth;
 | 
	
		
			
				|  |  | +        $this->data['maxheight'] = $maxheight;
 | 
	
		
			
				|  |  | +        $this->data['style'] = $style;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $this->render('sign-view-page', $this->data, TRUE);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  ?>
 |