|
@@ -67,6 +67,9 @@ class RProjectController extends DooController
|
|
|
|
|
|
//获取桌面版本
|
|
|
$this->getsoftware();
|
|
|
+
|
|
|
+ //草图入口
|
|
|
+ $this->data['imediateSwitch'] = $this->aconfig->getOne(array('select' => 'imediateswitch', 'asArray' => TRUE))['imediateswitch'];
|
|
|
}
|
|
|
|
|
|
function getsoftware(){
|
|
@@ -307,16 +310,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'])) {
|
|
@@ -331,7 +332,7 @@ class RProjectController extends DooController
|
|
|
} else {
|
|
|
$this->data['currconArray'] = $this->data['allconArray'] = NULL;
|
|
|
}
|
|
|
-// 面包屑导航标段
|
|
|
+ // 面包屑导航标段
|
|
|
$this->data['curractmeasureArray'] = NULL;
|
|
|
$this->data['allactmeasureArray'] = [];
|
|
|
$actmeasureArray = $this->actmeasure->getAll();
|
|
@@ -422,16 +423,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'])) {
|
|
@@ -446,7 +445,7 @@ class RProjectController extends DooController
|
|
|
} else {
|
|
|
$this->data['currconArray'] = $this->data['allconArray'] = NULL;
|
|
|
}
|
|
|
-// 面包屑导航标段
|
|
|
+ // 面包屑导航标段
|
|
|
$this->data['curractmeasureArray'] = NULL;
|
|
|
$this->data['allactmeasureArray'] = [];
|
|
|
$actmeasureArray = $this->actmeasure->getAll();
|
|
@@ -608,15 +607,47 @@ 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'] = [];
|
|
|
+ $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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $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);
|
|
@@ -632,7 +663,43 @@ 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'] = [];
|
|
|
+ $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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
// 期数列表
|
|
@@ -824,6 +891,194 @@ 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'] = [];
|
|
|
+ $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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Doo::loadHelper('DooPager');
|
|
|
+ $pagestr = '';
|
|
|
+ $sqlstr = ' 1';
|
|
|
+ $this->data['phaseno'] = '';
|
|
|
+ $this->data['nosign'] = '';
|
|
|
+
|
|
|
+ //获取项目信息
|
|
|
+ $searchsql = 'isinter!=0 and sid IN (SELECT sid FROM jl_sign_audit WHERE jl_sign_audit.audituid='.$this->auth->getUid().')';
|
|
|
+
|
|
|
+ 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;
|
|
|
+
|
|
|
+
|
|
|
+ $this->data['pid'] = $this->params['pid'];
|
|
|
+ $this->data['pmid'] = $this->params['pmid'];
|
|
|
+ $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);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
?>
|