RProjectController.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <?php
  2. Doo::loadClass('auth');
  3. Doo::loadClass('attfile');
  4. Doo::loadClass('profile');
  5. Doo::loadClass('project');
  6. Doo::loadClass('contractact');
  7. Doo::loadClass('actmeasure');
  8. Doo::loadClass('measureauditact');
  9. Doo::loadClass('numofperact');
  10. Doo::loadModelAt('aconfig', 'admin');
  11. Doo::loadClass('sms');
  12. /**
  13. * MainController
  14. * Feel free to delete the methods and replace them with your own code.
  15. *
  16. * @author darkredz
  17. */
  18. class RProjectController extends DooController
  19. {
  20. private $data, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $measureauditact, $numofperact, $statusArray = array('uncheck' => '未审批', 'checking' => '审批中', 'checked' => '已审批', 'checkno' => '未通过'), $aconfig, $sms;
  21. public function __construct()
  22. {
  23. $this->auth = new Auth();
  24. $this->attfile = new attFile();
  25. $this->profile = new Profile();
  26. $this->project = new Project();
  27. $this->contractact = new Contractact();
  28. $this->actmeasure = new actMeasure();
  29. $this->measureauditact = new MeasureauditAct();
  30. $this->numofperact = new NumofperAct();
  31. $this->aconfig = new AConfig();
  32. $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
  33. $this->data['rootUrl'] = Doo::conf()->APP_URL;
  34. $this->data['currChannle'] = 'r';
  35. $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
  36. $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
  37. if (isset($mpidArray[0]['pid'])) {
  38. $this->data['numofchecking'] = 0;
  39. foreach ($mpidArray as $key => $value) {
  40. // 审批操作按照时间排序多标段
  41. $this->data['numofchecking'] += $this->measureauditact->getCountMyChecking($value['pid'], $this->auth->getUid());
  42. }
  43. }
  44. if ($this->data['numofchecking'] == 0) {
  45. $this->data['numofchecking'] = null;
  46. }
  47. }
  48. public function beforeRun($resource, $action)
  49. {
  50. // $uGroups = $this->profile->getProWithUid($this->auth->getUid());
  51. // $falg = Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
  52. // if (!$falg)
  53. // return Doo::acl()->defaultFailedRoute;
  54. if ($this->auth->getUid()) {
  55. $uGroups = $this->profile->getProWithUid($this->auth->getUid());
  56. $falg = Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
  57. if (!$falg)
  58. return Doo::acl()->defaultFailedRoute;
  59. } else {
  60. return Doo::acl()->defaultFailedRoute;
  61. }
  62. }
  63. public function index()
  64. {
  65. $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
  66. if (isset($mpidArray[0]['pid'])) {
  67. foreach ($mpidArray as $key => $value) {
  68. // 审批操作按照时间排序多标段
  69. $numOfChecking = $this->measureauditact->getCountMyChecking($value['pid'], $this->auth->getUid());
  70. // end
  71. $this->data['proArray'][$key] = $this->project->getRowByPid($value['pid']);
  72. $this->data['proArray'][$key]['numofchecking'] = $numOfChecking;
  73. $this->data['proArray'][$key]['contracttotal'] = $this->actmeasure->getTotalWithPid($value['pid']);
  74. $this->data['proArray'][$key]['changTotal'] = $this->numofperact->getChangTotal($value['pid']);
  75. // $this->data['proArray'][$key]['contracttotal'] += $this->data['proArray'][$key]['changTotal'];
  76. $this->data['proArray'][$key]['currdone'] = $this->numofperact->getCurrDoneNow($value['pid']);
  77. if (($this->data['proArray'][$key]['contracttotal'] > 0) && ($this->data['proArray'][$key]['currdone'] > 0)) {
  78. $this->data['proArray'][$key]['pcurrdone'] = round(($this->data['proArray'][$key]['currdone'] / $this->data['proArray'][$key]['contracttotal']) * 100) . '%';
  79. } else {
  80. $this->data['proArray'][$key]['pcurrdone'] = '0%';
  81. }
  82. $this->data['proArray'][$key]['bcontracttotal'] = number_format($this->data['proArray'][$key]['contracttotal'], 2, '.', ',');
  83. $this->data['proArray'][$key]['bchangTotal'] = number_format($this->data['proArray'][$key]['changTotal'], 2, '.', ',');
  84. }
  85. } else {
  86. $this->data['proArray'] = array();
  87. }
  88. $this->render('r-project', $this->data);
  89. }
  90. public function proOverview()
  91. {
  92. // $this->data['pros'] = $this->project->getAll();
  93. // if (isset($_POST['pname']) && $_POST['pname']) {
  94. // $this->project->insertProject($_POST['pname']);
  95. // return Doo::conf()->APP_URL . 'project/index';
  96. // }
  97. $this->data['pid'] = $this->params['pid'];
  98. $this->render('w-project-detail', $this->data);
  99. }
  100. public function proSection()
  101. {
  102. $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
  103. foreach ($mpidArray as $k1 => $v1) {
  104. if ($v1['pid'] != $this->params['pid'])
  105. $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
  106. }
  107. $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
  108. $this->data['conArray'] = $this->contractact->getRowByPid($this->params['pid']);
  109. $auditArray = $this->measureauditact->getUserPmid($this->auth->getUid());
  110. foreach ($auditArray as $key => $value) {
  111. $pmidArray[] = $value['pmid'];
  112. }
  113. foreach ($this->data['conArray'] as $key => $value) {
  114. $html = null;
  115. $hetongTotal = $dispstopnowtotal = $dispnowtotal = $countNum = 0;
  116. $nstopnowtotal = $ncurrdone = $nnowtotal = number_format(0, 2, '.', ',');
  117. $pstopnowtotal = '0%';
  118. $pcurrdone = '0%';
  119. $ncurrdone = number_format(0, 2, '.', ',');
  120. $pnowtotal = '0%';
  121. $dispcurrdone = '0%';
  122. // $numStatusArray['currstatus'] = 'uncheck';
  123. $StidArray = $this->actmeasure->getAllbyStid($value['stid']);
  124. $currdoneInt = $this->numofperact->getCurrdoneSTID($value['stid'])['totalplus'];
  125. if (isset($StidArray))
  126. foreach ($StidArray as $k => $v) {
  127. if (in_array($v['pmid'], $pmidArray)) {
  128. $snTotal = $this->numofperact->getStopNowTotal($v['pmid']); //根据标段ID获取最新一期(包括不通过)
  129. $currcomTotal = $this->numofperact->getCurrdoneNew($v['pmid']); //截止目前
  130. $ncurrdone = number_format($currcomTotal['currtotal'], 2, '.', ',');
  131. $nstopnowtotal = number_format($snTotal['sntotal'], 2, '.', ',');
  132. if ($v['contracttotal'] > 0) {
  133. $nnowtotal = number_format($v['contracttotal'] - $currcomTotal['currtotal'] - $snTotal['sntotal'], 2, '.', ',');
  134. $pstopnowtotal = round(($snTotal['sntotal'] / $v['contracttotal']) * 100);
  135. $pcurrdone = round(($currcomTotal['currtotal'] / $v['contracttotal']) * 100);
  136. }
  137. $dispcurrdone = $pcurrdone . '%';
  138. $dispstopnowtotal = $pstopnowtotal . '%';
  139. $pnowtotal = 100 - $pcurrdone - $pstopnowtotal;
  140. $dispnowtotal = $pnowtotal . '%';
  141. $countNum = $this->numofperact->getLastNew2($v['pmid'])['numpname'];
  142. if (!isset($countNum)) {
  143. $countNum = 0;
  144. }
  145. $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $v['pmid']);
  146. if (!isset($numStatusArray['currstatus'])) {
  147. $numStatusArray['currstatus'] = 'uncheck';
  148. }
  149. $datatmp = $this->measureauditact->getMyAuditStatus2($numStatusArray['pmid'], $numStatusArray['numpname'], $numStatusArray['times'], $this->auth->getUid());
  150. if ($datatmp && ($datatmp['mastatus'] == 'checking')) {
  151. $buttonhtml = '<a class="btn btn-warning btn-small" href="/rproject/' . $this->params['pid'] . '/section/' . $v['pmid'] . '/report/' . $numStatusArray['mpid'] . '">开始审批</a>';
  152. } else {
  153. $buttonhtml = '(<span class="colOrange">' . $this->statusArray[$numStatusArray['currstatus']] . '</span>)';
  154. }
  155. $html .= '<tr>
  156. <td><a href="/rproject/' . $this->params['pid'] . '/section/' . $v['pmid'] . '/detail">' . $v['pmname'] . '</a></td>
  157. <td class="">第 ' . $countNum . ' 期 ' . $buttonhtml . '</td>
  158. <td class="taR">¥' . number_format($v['contracttotal'], 2, '.', ',') . '</td>
  159. <td>
  160. <div class="progress">
  161. <div class="bar bar-success" style="width: ' . $dispstopnowtotal . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="截止上期完成:¥' . $nstopnowtotal . '">' . $dispstopnowtotal . '</div>
  162. <div class="bar" style="width:' . $dispcurrdone . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="本期完成:¥' . $ncurrdone . '">' . $dispcurrdone . '</div>
  163. <div class="bar bar-gary" style="width:' . $dispnowtotal . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="未完成:¥' . $nnowtotal . '">' . $dispnowtotal . '</div>
  164. </div>
  165. </td>
  166. </tr>';
  167. $hetongTotal += $v['contracttotal'];
  168. }
  169. }
  170. $this->data['conArray'][$key]['htmlstr'] = $html;
  171. $this->data['conArray'][$key]['hetongTotal'] = number_format($hetongTotal, 2, '.', ',');
  172. $this->data['conArray'][$key]['phetongTotal'] = 0;
  173. $this->data['conArray'][$key]['nhetongTotal'] = 0;
  174. $this->data['conArray'][$key]['phetongTotal2'] = 0;
  175. $this->data['conArray'][$key]['ncurrdoneInt'] = 0;
  176. $this->data['conArray'][$key]['phetongTotal'] = round(($currdoneInt / $hetongTotal) * 100) . '%';
  177. $this->data['conArray'][$key]['nhetongTotal'] = number_format($currdoneInt, 2, '.', ',');
  178. $this->data['conArray'][$key]['phetongTotal2'] = round((($hetongTotal - $currdoneInt) / $hetongTotal) * 100) . '%';
  179. $this->data['conArray'][$key]['ncurrdoneInt'] = number_format($hetongTotal - $currdoneInt, 2, '.', ',');
  180. }
  181. $this->render('r-project-section', $this->data, TRUE);
  182. }
  183. function proSectionMeasure()
  184. {
  185. $mpidArray = $this->measureauditact->getAuditProject($this->auth->getUid());
  186. foreach ($mpidArray as $k1 => $v1) {
  187. if ($v1['pid'] != $this->params['pid'])
  188. $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
  189. }
  190. $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
  191. $this->data['pid'] = $this->params['pid'];
  192. $this->data['mpid'] = $this->params['mpid'];
  193. $this->data['mastatus'] = $this->measureauditact->getStatusByMpid($this->params['mpid'])['mastatus'];
  194. if (isset($_POST['submit'])) {
  195. if ($_POST['submit'] == 'ok') {
  196. $this->measureauditact->setStatusTrue($this->params['mpid']);
  197. return Doo::conf()->APP_URL . 'rproject/' . $this->params['pid'] . '/section/' . $this->params['mpid'] . '/measure';
  198. }
  199. if ($_POST['submit'] == 'no') {
  200. $this->measureauditact->setStatusFalse($this->params['mpid']);
  201. return Doo::conf()->APP_URL . 'rproject/' . $this->params['pid'] . '/section/' . $this->params['mpid'] . '/measure';
  202. }
  203. }
  204. // $jsonpath = pathinfo($this->attfile->getMaxRow()['filepath']);
  205. // $extPathdir = Doo::conf()->SITE_PATH . $jsonpath['dirname'] . '/' . $jsonpath['filename'];
  206. // if ($handle = opendir($extPathdir)) {
  207. // while (false !== ($file = readdir($handle))) {
  208. // $filename = pathinfo($file);
  209. // if ($filename['extension'] == 'json')
  210. // $proArray = json_decode(file_get_contents($extPathdir . '/' . $file));
  211. // }
  212. // closedir($handle);
  213. // }
  214. // $this->data['proArray'] = $proArray;
  215. $this->render('r-project-section-measure', $this->data, TRUE);
  216. }
  217. Function fNumber($number)
  218. {
  219. if ($number == '')
  220. Return "-";
  221. $nlen = strlen($number);
  222. while ($nlen > 3) {
  223. $fNumber = "," . substr($number, $nlen - 3, 3);
  224. $number = substr($number, 0, -3);
  225. $nlen = strlen($number);
  226. }
  227. if ($nlen <= 3) {
  228. $fNumber = $number . $fNumber;
  229. }
  230. Return $fNumber;
  231. }
  232. public function welcome()
  233. {
  234. // if (!$this->auth->isLoggedIn())
  235. // return Doo::conf()->APP_URL;
  236. if ($this->profile->getProWithUid($_SESSION['uid'])['userid'])
  237. return Doo::conf()->APP_URL . 'project/list';
  238. if (isset($_POST['welform'])) {
  239. $profileUserArray = $_POST;
  240. $profileUserArray['userid'] = $_SESSION['uid'];
  241. $this->profile->insertProfile($profileUserArray); // 无自增字段返回0
  242. return Doo::conf()->APP_URL . 'project/list';
  243. }
  244. $this->render('welcome', $this->data);
  245. }
  246. public function prolist()
  247. {
  248. // if (!$this->auth->isLoggedIn())
  249. // return Doo::conf()->APP_URL;
  250. // $proArray = new stdClass();
  251. // $jsonpath = pathinfo($this->attfile->getMaxRow()['filepath']);
  252. // $extPathdir = Doo::conf()->SITE_PATH . $jsonpath['dirname'] . '/' . $jsonpath['filename'];
  253. // if ($handle = opendir($extPathdir)) {
  254. // while (false !== ($file = readdir($handle))) {
  255. // $filename = pathinfo($file);
  256. // if ($filename['extension'] == 'json')
  257. // $proArray = json_decode(file_get_contents($extPathdir . '/' . $file));
  258. // }
  259. // closedir($handle);
  260. // }
  261. // $this->data['proArray'] = null;
  262. $this->render('s-project', $this->data);
  263. }
  264. public function proDetail()
  265. {
  266. $numStatusArray = $this->numofperact->getLastRow($this->params['pid'], $this->params['pmid']);
  267. // 项目名称
  268. $mpidArray = $this->measureauditact->getAuditProject2($this->auth->getUid());
  269. foreach ($mpidArray as $k1 => $v1) {
  270. if ($v1['pid'] != $this->params['pid'])
  271. $this->data['allproArray'][] = $this->project->getRowByPid($v1['pid']);
  272. }
  273. $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
  274. $this->data['MeasureArray'] = $this->numofperact->getGroupByLastOne($this->params['pmid']);
  275. $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
  276. foreach ($this->data['MeasureArray'] as $key => $value) {
  277. if ($measureArray['contracttotal'] > ($value['currdone'] > 0)) {
  278. $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
  279. } else {
  280. $this->data['MeasureArray'][$key]['lessTotal'] = 0;
  281. }
  282. }
  283. $this->data['pmid'] = $this->params['pmid'];
  284. $this->data['pid'] = $this->params['pid'];
  285. $this->data['mpid'] = $numStatusArray['mpid'];
  286. $this->render('r-project-section-detail', $this->data, TRUE);
  287. }
  288. public function proReport()
  289. {
  290. // 面包屑导航
  291. // 期数列表
  292. $tmpArray = $this->numofperact->getGroupByLastOne2($this->params['pmid']);
  293. foreach ($tmpArray as $k => $v) {
  294. $intTime = $this->numofperact->getMaxTimes($v['pmid'], $v['numpname'])['times'];
  295. $nfArray[] = $this->numofperact->getRow($v['pmid'], $v['numpname'], $intTime);
  296. }
  297. foreach ($nfArray as $k => $v) {
  298. if ($v['mpid'] == $this->params['mpid']) {
  299. $this->data['mpid'] = $v['mpid'];
  300. $this->data['MeasureArray2'][] = $v;
  301. $this->data['currnum'] = $v['numpname'];
  302. } else {
  303. $this->data['numArray'][] = $v;
  304. }
  305. }
  306. $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
  307. foreach ($this->data['MeasureArray2'] as $key => $value) {
  308. if ($value['mpid'] == $this->params['mpid']) {
  309. $this->data['MeasureArray2'][$key]['currstatus'] = $this->statusArray[$value['currstatus']];
  310. if ($measureArray['contracttotal'] > ($value['currdone'] > 0)) {
  311. $this->data['MeasureArray2'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
  312. } else {
  313. $this->data['MeasureArray2'][$key]['lessTotal'] = 0;
  314. }
  315. }
  316. }
  317. //
  318. $lastRowArray = $this->numofperact->getLastNew2($this->params['pmid']);
  319. $maxTimes = $this->numofperact->getMaxTimes($lastRowArray['pmid'], $lastRowArray['numpname']);
  320. // $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
  321. $maxtimez = $this->measureauditact->getRowGroupByTimes($this->params['mpid']);
  322. $auditUserArray = $this->measureauditact->getRowByMpidTimes($this->params['mpid'], $maxtimez['times']);
  323. $auditArray = $this->measureauditact->getLastNewRowInfo($lastRowArray['pmid'], $lastRowArray['numpname'], $this->auth->getUid());
  324. if (isset($_POST['act'])) {
  325. $auditStatusArray = array('checkno', 'checked');
  326. $myAuditStatus = $this->measureauditact->getMyAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $this->auth->getUid());
  327. if (in_array($myAuditStatus['mastatus'], $auditStatusArray)) {
  328. echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
  329. die();
  330. }
  331. }
  332. if ($_POST['act'] == 'p') {
  333. if ($this->measureauditact->setMyAuditPass($auditArray['maid'], $_POST['content'], 1, $this->auth->getUid())) {
  334. $countAudit = count($auditUserArray);
  335. $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
  336. if ($auditArray['last'] == 1) {
  337. $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checked', $maxTimes['times']);
  338. echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
  339. die();
  340. } else {
  341. if (($countAudit == 2) && ($auditUserArray[1]['last'] == 1) && ($auditUserArray[0]['maid'] == $auditArray['maid'])) {
  342. $this->measureauditact->updateMastatus($auditUserArray[1]['maid']);
  343. $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
  344. echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
  345. die();
  346. }
  347. if (($countAudit > 2)) {
  348. foreach ($auditUserArray as $k => $v) {
  349. if ($v['maid'] == $auditArray['maid']) {
  350. if ($k == ($countAudit - 1)) {//如果是最后一个
  351. $this->measureauditact->updateMastatus($auditUserArray[0]['maid']);
  352. } else {
  353. $this->measureauditact->updateMastatus($auditUserArray[$k + 1]['maid']);
  354. // SMS Start
  355. $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[$k + 1]['auditoruid']);
  356. $pmnameArray = $this->actmeasure->getRowByPmid($auditUserArray[$k + 1]['pmid']);
  357. if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {
  358. $this->__auditNotice($verifyUserArray['mobile'], $pmnameArray["pmname"] . ',' . $verifyUserArray["name"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR"]);
  359. }
  360. // SMS End
  361. }
  362. $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
  363. echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
  364. die();
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. if ($_POST['act'] == 'np') {
  372. $this->measureauditact->setCheckno($auditArray['maid'], $_POST['content'], 1);
  373. $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $maxTimes['times']);
  374. $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
  375. echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
  376. die();
  377. }
  378. $this->data['pmid'] = $lastRowArray['pmid'];
  379. $this->data['numpname'] = $lastRowArray['numpname'];
  380. $this->data['times'] = $lastRowArray['times'];
  381. $this->data['pid'] = $this->params['pid'];
  382. foreach ($auditUserArray as $key => $value) {
  383. $strAvatar = $this->auth->getAvatar($value['auditoruid']);
  384. $i = $key + 1;
  385. if ($value['auditoruid'] == $this->auth->getUid()) {
  386. $this->data['mastatus'] = $value['mastatus'];
  387. $this->data['maid'] = $value['maid'];
  388. }
  389. if ($value['mastatus'] == 'uncheck') {
  390. $statuStr = '';
  391. $statucolorStr = '';
  392. $statushtml = '<li title="" class=""><img src="' . $strAvatar . '"></li>';
  393. }
  394. if ($value['mastatus'] == 'checking') {
  395. $statuStr = '<h4 class="colOrange">审批中</h4>';
  396. $statucolorStr = 'colOrange';
  397. $statushtml = '<li title="审批中" class="wait"><span data-icon="k" aria-hidden="true"></span> <img src="' . $strAvatar . '"></li>';
  398. }
  399. if ($value['mastatus'] == 'checked') {
  400. $statuStr = '<h4 class="colGreen">审批完成(' . date('Y-m-d', $value['audittime']) . ')</h4>';
  401. $statucolorStr = 'colGreen';
  402. $statushtml = '<li title="审批通过" class="pass"><span data-icon="d" aria-hidden="true"></span><img src="' . $strAvatar . '"></li>';
  403. }
  404. if ($value['mastatus'] == 'checkno') {
  405. $statuStr = '<h4 class="colRed">审批不通过(' . date('Y-m-d', $value['audittime']) . ')</h4>';
  406. $statucolorStr = 'colRed';
  407. $statushtml = '<li title="审批不通过" class="notpass"><span data-icon="e" aria-hidden="true"></span><img src="' . $strAvatar . '"></li>';
  408. }
  409. $auditUserArray[$key]['statuStr'] = $statuStr;
  410. $auditUserArray[$key]['statucolorStr'] = $statucolorStr;
  411. $auditUserArray[$key]['statushtml'] = $statushtml;
  412. $auditUserArray[$key]['k'] = $i;
  413. $auditUserArray[$key]['name'] = $this->profile->getProWithUid($value['auditoruid'])['name'];
  414. }
  415. $this->data['auditArray'] = $auditUserArray;
  416. $this->data['pmid'] = $this->params['pmid'];
  417. $this->data['pid'] = $this->params['pid'];
  418. $this->data['mpid'] = $this->params['mpid'];
  419. $this->render('r-project-section-report', $this->data, TRUE);
  420. }
  421. /**
  422. * 。
  423. * 标段ID,期号
  424. */
  425. private function __auditNotice($mobile, $text)
  426. {
  427. $smsSwitch = $this->aconfig->getOne(array('select' => 'smsSwitch', 'asArray' => TRUE))['smsSwitch'];
  428. if ($smsSwitch > 0)
  429. return $this->sms->sendSms($mobile, $text);
  430. }
  431. }
  432. ?>