|
@@ -25,9 +25,9 @@ class ChangeController extends DooController
|
|
|
|
|
|
private $aconfig, $data, $sms, $sign, $change, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $measureauditact, $numofperact, $__hashids, $statusArray = array('uncheck' => '<span class = "colGray">未审批</span>', 'checking' => '<span class = "colOrange">审批中</span>', 'checked' => '<span class = "colGreen">审批通过</span>', 'checkno' => '<span class = "colRed">审批不通过</span>');
|
|
|
|
|
|
- private $changeType = array('1' => 'A.位置', '2' => 'B.数量', '3' => 'C.结构', '4' => 'D.新增', '5' => 'E.取消', '6' => 'F.纠错');
|
|
|
+ private $changeType = array('2' => 'A.数量', '1' => 'B.位置', '3' => 'C.结构', '4' => 'D.新增', '5' => 'E.取消', '6' => 'F.纠错');
|
|
|
|
|
|
- private $changeCategory = array('1' => 'A类变更(设计变更)', '2' => 'B类变更(施工措施变更)', '3' => 'C类变更(计划变更)', '4' => 'D类变更(条件变更)', '5' => 'E类变更(新增工程)');
|
|
|
+ private $changeCategory = array('1' => 'A类变更', '2' => 'B类变更', '3' => 'C类变更', '4' => 'D类变更', '5' => 'E类变更');
|
|
|
|
|
|
private $changeNature = array('1' => '一般设计变更', '2' => '较大设计变更', '3' => '重大设计变更');
|
|
|
|
|
@@ -350,7 +350,7 @@ class ChangeController extends DooController
|
|
|
$ototalnum = 0;
|
|
|
$ctotalnum = 0;
|
|
|
$stotalnum = 0;
|
|
|
- $listtablehtml = '<table class="table table-striped table-bordered nowrap" id="tablelist" cellspacing="0" width="100%">
|
|
|
+ $listtablehtml = '<table class="table table-striped table-bordered nowrap qd-table" id="tablelist" cellspacing="0" width="100%">
|
|
|
<thead>
|
|
|
<tr><th rowspan="2" class="text-center" width="100">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th>';
|
|
|
$thhtml = '<th class="text-center">数量</th>
|
|
@@ -479,6 +479,12 @@ class ChangeController extends DooController
|
|
|
|
|
|
//获取审批流程列表
|
|
|
$auditlist = $this->change->getChangeAuditsbySort($cid);
|
|
|
+ if(!empty($auditlist)){
|
|
|
+ foreach($auditlist as $ak => $av){
|
|
|
+ $auditlist[$ak]['email'] = $this->auth->getEmail($av['uid']);
|
|
|
+ $auditlist[$ak]['lastusite'] = $this->change->getChangeAuditsMaxUsite($cid,$av['times'])['maxsite'];
|
|
|
+ }
|
|
|
+ }
|
|
|
$this->data['auditlist'] = $auditlist;
|
|
|
|
|
|
$this->render('biangeng-detail', $this->data, TRUE);
|
|
@@ -684,7 +690,7 @@ class ChangeController extends DooController
|
|
|
$measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
|
|
|
$inside = 1;
|
|
|
$userlist = array();
|
|
|
- $usernamelist = array();
|
|
|
+ $useridlist = array();
|
|
|
if(!empty($auditactlist)){
|
|
|
foreach($auditactlist as $k => $v){
|
|
|
if($measureArray['uid'] == $v['auditoruid']){
|
|
@@ -696,7 +702,8 @@ class ChangeController extends DooController
|
|
|
$userlist[$k]['jobs'] = $usermsg['jobs'];
|
|
|
$userlist[$k]['avatar'] = $usermsg['avatar'];
|
|
|
$userlist[$k]['company'] = $usermsg['company'];
|
|
|
- array_push($usernamelist, $usermsg['name']);
|
|
|
+ $userlist[$k]['email'] = $this->auth->getEmail($v['auditoruid']);
|
|
|
+ array_push($useridlist, $usermsg['userid']);
|
|
|
}
|
|
|
}
|
|
|
if($inside){
|
|
@@ -706,15 +713,18 @@ class ChangeController extends DooController
|
|
|
$orginArray['name'] = $usermsg2['name'];
|
|
|
$orginArray['jobs'] = $usermsg2['jobs'];
|
|
|
$orginArray['company'] = $usermsg2['company'];
|
|
|
+ $orginArray['email'] = $this->auth->getEmail($measureArray['uid']);
|
|
|
array_push($userlist,$orginArray);
|
|
|
- array_push($usernamelist, $usermsg2['name']);
|
|
|
+ array_push($useridlist, $usermsg2['userid']);
|
|
|
}
|
|
|
|
|
|
$this->data['pmArray'] = $pmArray;
|
|
|
$this->data['userlist'] = $userlist;
|
|
|
- $this->data['usernamelist'] = implode(',',$usernamelist);
|
|
|
+ $this->data['useridlist'] = implode(',',$useridlist);
|
|
|
|
|
|
- $this->data['userArray'] = $this->auth->getRowByUid($this->auth->getUid());
|
|
|
+ $userArray = $this->auth->getRowByUid($this->auth->getUid());
|
|
|
+ $userArray['email'] = $this->auth->getEmail($this->auth->getUid());
|
|
|
+ $this->data['userArray'] = $userArray;
|
|
|
|
|
|
$this->data['list'] = $list;
|
|
|
$this->data['year'] = date('Y',time());
|
|
@@ -916,6 +926,11 @@ class ChangeController extends DooController
|
|
|
$changeaudit = new ChangeAudit();
|
|
|
//获取最后一次上报的上报人信息
|
|
|
$auditArray = $changeaudit->getChangeAuditLastUser($cid,0);
|
|
|
+ //获取uid最新上报人信息
|
|
|
+ $userArray = $this->auth->getRowByUid($auditArray['uid']);
|
|
|
+ $auditArray['company'] = $userArray['company'];
|
|
|
+ $auditArray['jobs'] = $userArray['jobs'];
|
|
|
+ $auditArray['name'] = $userArray['name'];
|
|
|
//获取最后一个审批人的usort
|
|
|
$auditArray2 = $changeaudit->getChangeAuditLastUser($cid);
|
|
|
//新建新的提交人,并把time+1
|
|
@@ -978,7 +993,7 @@ class ChangeController extends DooController
|
|
|
$ototalnum = 0;
|
|
|
$ctotalnum = 0;
|
|
|
$stotalnum = 0;
|
|
|
- $listtablehtml = '<table class="table table-striped table-bordered nowrap" id="tablelist" cellspacing="0" width="100%">
|
|
|
+ $listtablehtml = '<table class="table table-striped table-bordered nowrap qd-table" id="tablelist" cellspacing="0" style="width:100%">
|
|
|
<thead>
|
|
|
<tr><th rowspan="2" class="text-center" width="100">清单编号</th><th rowspan="2" class="text-center">名称</th><th rowspan="2" class="text-center">单位</th><th rowspan="2" class="text-center">单价</th><th colspan="2" class="text-center">原设计</th><th colspan="2" class="text-center">申报变更增(+)减(-)</th>';
|
|
|
$thhtml = '<th class="text-center">数量</th>
|
|
@@ -1101,6 +1116,12 @@ class ChangeController extends DooController
|
|
|
$this->data['attlist'] = $showattlist;
|
|
|
|
|
|
$auditlist2 = $this->change->getChangeAuditsbySort($cid);
|
|
|
+ if(!empty($auditlist2)){
|
|
|
+ foreach($auditlist2 as $ak => $av){
|
|
|
+ $auditlist2[$ak]['email'] = $this->auth->getEmail($av['uid']);
|
|
|
+ $auditlist2[$ak]['lastusite'] = $this->change->getChangeAuditsMaxUsite($cid,$av['times'])['maxsite'];
|
|
|
+ }
|
|
|
+ }
|
|
|
$this->data['auditlist'] = $auditlist2;
|
|
|
|
|
|
//判断是否为本标段终审人
|
|
@@ -1344,7 +1365,7 @@ class ChangeController extends DooController
|
|
|
$measureArray = $this->actmeasure->getRowByPmid($pmArray['pmid']);
|
|
|
$inside = 1;
|
|
|
$userlist = array();
|
|
|
- $usernamelist = array();
|
|
|
+ $useridlist = array();
|
|
|
if(!empty($auditactlist)){
|
|
|
foreach($auditactlist as $k => $v){
|
|
|
if($measureArray['uid'] == $v['auditoruid']){
|
|
@@ -1356,7 +1377,8 @@ class ChangeController extends DooController
|
|
|
$userlist[$k]['jobs'] = $usermsg['jobs'];
|
|
|
$userlist[$k]['avatar'] = $usermsg['avatar'];
|
|
|
$userlist[$k]['company'] = $usermsg['company'];
|
|
|
- array_push($usernamelist, $usermsg['name']);
|
|
|
+ $userlist[$k]['email'] = $this->auth->getEmail($v['auditoruid']);
|
|
|
+ array_push($useridlist, $usermsg['userid']);
|
|
|
}
|
|
|
}
|
|
|
if($inside){
|
|
@@ -1366,27 +1388,30 @@ class ChangeController extends DooController
|
|
|
$orginArray['name'] = $usermsg2['name'];
|
|
|
$orginArray['jobs'] = $usermsg2['jobs'];
|
|
|
$orginArray['company'] = $usermsg2['company'];
|
|
|
+ $orginArray['email'] = $this->auth->getEmail($measureArray['uid']);
|
|
|
array_push($userlist,$orginArray);
|
|
|
- array_push($usernamelist, $usermsg2['name']);
|
|
|
+ array_push($useridlist, $usermsg2['userid']);
|
|
|
}
|
|
|
|
|
|
//获取已选审批人列表,生成changeaudit和selectauditlist,并把未在常用审批人的uid找出来
|
|
|
$auditlist = $this->change->getChangeAuditsbycidtime($cid,$changeArray['times']);
|
|
|
$changeauditList = array();
|
|
|
$selectauditlist = array();
|
|
|
- $searchauditlist = array();
|
|
|
foreach($auditlist as $adk => $adv){
|
|
|
+ $email = $this->auth->getEmail($adv['uid']);
|
|
|
+ $auditlist[$adk]['email'] = $email;
|
|
|
+ $auditlist[$adk]['lastusite'] = count($auditlist);
|
|
|
array_push($changeauditList,$adv['uid']);
|
|
|
- $addauditlist = $adv['uid'].'_'.$adv['name'].'_'.$adv['company'].'_'.$adv['jobs'];
|
|
|
+ $addauditlist = $adv['uid'].'_'.$adv['name'].'_'.$adv['company'].'_'.$adv['jobs'].'_'.$email;
|
|
|
array_push($selectauditlist,$addauditlist);
|
|
|
- if(!in_array($adv['name'],$usernamelist)){
|
|
|
- array_push($searchauditlist,$auditlist[$adk]);
|
|
|
- array_push($usernamelist,$adv['name']);
|
|
|
- }
|
|
|
+// if(!in_array($adv['uid'],$useridlist)){
|
|
|
+// $auditlist[$adk]['email'] = $this->auth->getEmail($adv['uid']);
|
|
|
+// array_push($useridlist,$adv['uid']);
|
|
|
+// }
|
|
|
+ $auditlist[$adk]['islast'] = $adk+1 == count($auditlist) ? 1 : 0;
|
|
|
}
|
|
|
$this->data['changeaudit'] = implode(',',$changeauditList);
|
|
|
$this->data['selectauditlist'] = implode('->',$selectauditlist);
|
|
|
- $this->data['sauditlist'] = $searchauditlist;
|
|
|
$this->data['auditlist'] = $auditlist;
|
|
|
|
|
|
//获取已选清单列表,已选清单id列表,属于签约清单的changelist,和changewhitelist
|
|
@@ -1449,9 +1474,11 @@ class ChangeController extends DooController
|
|
|
$this->data['changeArray'] = $changeArray;
|
|
|
$this->data['pmArray'] = $pmArray;
|
|
|
$this->data['userlist'] = $userlist;
|
|
|
- $this->data['usernamelist'] = implode(',',$usernamelist);
|
|
|
+ $this->data['useridlist'] = implode(',',$useridlist);
|
|
|
|
|
|
- $this->data['userArray'] = $this->auth->getRowByUid($this->auth->getUid());
|
|
|
+ $userArray = $this->auth->getRowByUid($this->auth->getUid());
|
|
|
+ $userArray['email'] = $this->auth->getEmail($this->auth->getUid());
|
|
|
+ $this->data['userArray'] = $userArray;
|
|
|
$this->data['list'] = $list;
|
|
|
$this->data['year'] = date('Y',time());
|
|
|
|
|
@@ -1459,6 +1486,12 @@ class ChangeController extends DooController
|
|
|
if($changeArray['status'] == 'back'){
|
|
|
$creatorArray = $this->change->getChangeAuditLastUser($cid,0);
|
|
|
$auditlist2 = $this->change->getChangeAuditsbySort($cid,$creatorArray['times']);
|
|
|
+ if(!empty($auditlist2)){
|
|
|
+ foreach($auditlist2 as $ak => $av){
|
|
|
+ $auditlist2[$ak]['email'] = $this->auth->getEmail($av['uid']);
|
|
|
+ $auditlist2[$ak]['lastusite'] = $this->change->getChangeAuditsMaxUsite($cid,$av['times'])['maxsite'];
|
|
|
+ }
|
|
|
+ }
|
|
|
$this->data['auditlist2'] = $auditlist2;
|
|
|
}
|
|
|
|
|
@@ -1527,12 +1560,19 @@ class ChangeController extends DooController
|
|
|
|
|
|
$usermsg = $this->profile->checkUserName($_GET['name']);
|
|
|
if(!empty($usermsg)){
|
|
|
- $namelist = $_POST['namelist'];
|
|
|
- if(in_array($usermsg['name'], $namelist)){
|
|
|
- echo json_encode(array('code' => 400, 'msg' => '列表或常用中已存在当前审批人'));
|
|
|
+ $useridlist = $_POST['useridlist'];
|
|
|
+ $userlist = array();
|
|
|
+ foreach($usermsg as $k => $v){
|
|
|
+ if(!in_array($v['userid'], $useridlist)){
|
|
|
+ $usermsg[$k]['email'] = $this->auth->getEmail($v['userid']);
|
|
|
+ array_push($userlist,$usermsg[$k]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!empty($userlist)){
|
|
|
+ echo json_encode(array('code' => 200, 'userlist' => $userlist));
|
|
|
exit;
|
|
|
}else{
|
|
|
- echo json_encode(array('code' => 200, 'user' => $usermsg));
|
|
|
+ echo json_encode(array('code' => 400, 'msg' => '常用中已存在当前审批人'));
|
|
|
exit;
|
|
|
}
|
|
|
}else{
|