Jelajahi Sumber

1.6.0版本,包含app,分享项目,图表修改等

likeku 8 tahun lalu
induk
melakukan
d980fb67a4
66 mengubah file dengan 17528 tambahan dan 3162 penghapusan
  1. 6765 0
      global/css/app/bootstrap.css
  2. 497 0
      global/css/app/style.css
  3. TEMPAT SAMPAH
      global/css/fonts/icomoon.eot
  4. 45 42
      global/css/fonts/icomoon.svg
  5. TEMPAT SAMPAH
      global/css/fonts/icomoon.ttf
  6. TEMPAT SAMPAH
      global/css/fonts/icomoon.woff
  7. 3 1
      global/css/icomoon/Read Me.txt
  8. 79 75
      global/css/icomoon/demo-files/demo.css
  9. 22 22
      global/css/icomoon/demo-files/demo.js
  10. 745 571
      global/css/icomoon/demo.html
  11. TEMPAT SAMPAH
      global/css/icomoon/fonts/icomoon.eot
  12. 45 42
      global/css/icomoon/fonts/icomoon.svg
  13. TEMPAT SAMPAH
      global/css/icomoon/fonts/icomoon.ttf
  14. TEMPAT SAMPAH
      global/css/icomoon/fonts/icomoon.woff
  15. 1138 848
      global/css/icomoon/selection.json
  16. 74 63
      global/css/icomoon/style.css
  17. 2380 0
      global/js/app/bootstrap.js
  18. 32 0
      global/js/app/echarts.min.js
  19. 38 0
      global/js/app/global.js
  20. 145 1
      global/js/bootstrap.js
  21. 32 0
      global/js/echarts.min.js
  22. 57 0
      protected/class/Hashids/HashGenerator.php
  23. 353 0
      protected/class/Hashids/Hashids.php
  24. 2 7
      protected/class/attfile.php
  25. 10 0
      protected/class/contractact.php
  26. 3 12
      protected/class/itemmeasurenum.php
  27. 25 0
      protected/class/measureauditact.php
  28. 91 115
      protected/class/numofperact.php
  29. 2 15
      protected/class/profile.php
  30. 37 25
      protected/class/project.php
  31. 71 0
      protected/class/shareact.php
  32. 27 0
      protected/config/routes.conf.php
  33. 589 0
      protected/controller/AppController.php
  34. 23 49
      protected/controller/ClientController.php
  35. 33 18
      protected/controller/ProjectController.php
  36. 10 8
      protected/controller/RProjectController.php
  37. 80 25
      protected/controller/SProjectController.php
  38. 669 0
      protected/controller/ShareController.php
  39. 26 0
      protected/model/share.php
  40. 1 1
      protected/model/uprofile.php
  41. 40 1
      protected/module/admin/controller/AdminController.php
  42. 254 0
      protected/module/admin/controller/ProController.php
  43. 27 3
      protected/module/admin/model/ameasure.php
  44. 38 5
      protected/module/admin/model/measureaudit.php
  45. 31 0
      protected/module/admin/model/numofper.php
  46. 6 0
      protected/module/admin/view/admin-addUser.html
  47. 52 0
      protected/module/admin/view/admin-editUser.html
  48. 223 0
      protected/module/admin/view/admin-period.html
  49. 126 0
      protected/module/admin/view/admin-project.html
  50. 201 112
      protected/module/admin/view/admin-section.html
  51. 2 0
      protected/module/admin/view/admin-userlist.html
  52. 1 0
      protected/module/admin/view/menu.html
  53. 375 0
      protected/view/r-project-section-detail-APP.html
  54. 108 117
      protected/view/r-project-section-detail.html
  55. 1 1
      protected/view/r-project-section-report.html
  56. 231 240
      protected/view/s-project-section-detail.html
  57. 173 193
      protected/view/s-project-section.html
  58. 303 308
      protected/view/w-project-detail.html
  59. 226 235
      protected/view/w-project-section-detail.html
  60. 211 7
      protected/view/w-project.html
  61. 31 0
      protected/view/w-share-erro.html
  62. 222 0
      protected/view/w-share-project-section-detail.html
  63. 208 0
      protected/view/w-share-project-section.html
  64. 278 0
      protected/view/w-share-project.html
  65. 10 0
      分享项目.sql
  66. 1 0
      备注信息.sql

File diff ditekan karena terlalu besar
+ 6765 - 0
global/css/app/bootstrap.css


+ 497 - 0
global/css/app/style.css

@@ -0,0 +1,497 @@
+@charset "utf-8";
+@font-face {
+  font-family: 'icomoon';
+  src:url('fonts/icomoon.eot');
+  src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
+    url('fonts/icomoon.woff') format('woff'),
+    url('fonts/icomoon.ttf') format('truetype'),
+    url('fonts/icomoon.svg#icomoon') format('svg');
+  font-weight: normal;
+  font-style: normal;
+}
+[data-icon]:before {
+  font-family: 'icomoon';
+  content: attr(data-icon);
+  speak: none;
+  font-weight: normal;
+  font-variant: normal;
+  text-transform: none;
+  line-height: 1;
+  -webkit-font-smoothing: antialiased;
+  vertical-align:middle
+}
+ul, ol, li{
+  line-height:normal;
+  list-style-image:none;
+  list-style-position:outside;
+  list-style-type:none;
+  margin:0
+}
+dl {
+  margin:0
+}
+dd {
+  margin-left:0
+}
+body{
+  font-size:12px;
+}
+html, form, fieldset, a, ul, ol, li, div, legend, label,
+br, input, button, textarea, h1, h2, h3, h4, h5,em{
+  padding: 0;
+  margin: 0;
+  font-weight: normal;
+  font-style: normal;
+  font-family:"微软雅黑","Tahoma";
+  vertical-align: baseline;
+  text-align:justify;
+  word-wrap:break-word;
+  text-justify:inter-ideograph
+}
+body{text-align:center}
+a {
+  outline:none;
+} 
+
+a {
+  color: #0088cc;
+  text-decoration: none;
+}
+a:hover,
+a:focus {
+  color: #005580;
+  text-decoration:none;
+}
+.taC,td.taC,th.taC{text-align: center;}
+.taR,td.taR,th.taR{text-align:right;}
+.fL{float:left}
+.fR{float:right}
+.width960{
+  width:960px;
+  margin:0 auto;
+}
+.colRed {color:#f70000}
+.colOrange {color:#ed8b00}
+.colYel {color:#d9a601}
+.colGreen{color:#17ab0c}
+.colGray{color:#999}
+.colBlue{color:#3172d9}
+.wrapHeader{
+  height:4rem;
+  background:url(headerBg.jpg) repeat-x 0 0;
+}
+.headerTop{
+  height:0.4rem;
+  background:#CFD37A;
+}
+.wrapForm{
+  margin:0 auto;
+}
+.wrapForm .headerTitle{
+  padding:4rem 0 2rem 0;
+  font-size: 3.2rem;
+  text-align: center;
+}
+.formCon{
+  margin:0 1rem;
+}
+.formCon label{
+  margin:0.5rem 0;
+  font-size: 1.6rem;
+}
+.formCon input{
+  width:100%;
+  padding:0;
+  height:4rem;
+  line-height: 4rem;
+  text-indent: 0.5rem;
+}
+.formCon button{
+  margin:1rem 0 1rem 0;
+  width:100%;
+  height:4rem;
+  line-height: 3.2rem;
+}
+.wrapTop{
+  height:5rem;
+  background:url(headerBg.jpg) repeat-x 0 0;
+}
+.wrapTop .mainLogo{
+  width:20rem;
+  height:4rem;
+  line-height: 4rem;
+  background:url(logo.png) no-repeat 0 0;
+}
+.wrapTop .userInfo{
+  font-size: 1.8rem;
+  color:#fff;
+}
+.wrapTop #dropdownMenu{
+  position:absolute;
+  left:-11rem;
+}
+.wrapTop #dropdownMenu a{
+  color:#333;
+}
+.wrapTop .userInfo{
+  padding:1rem 2rem 0 1rem;
+}
+.wrapTop .userInfo a{
+  color:#fff;
+}
+.wrapTop .userInfo .topImg{
+  padding:0 0 0 2rem;
+}
+.mainNav{
+  margin:0 1.5rem;
+}
+.mainNav ul li{
+  position:relative;
+  padding:1.5rem 0;
+  border-bottom:1px solid #ddd; 
+}
+.mainNav .projectImg{
+  margin:0 1.5rem 0 0;
+  width:5rem;
+  height:5rem;
+  background:#f0f0f0;
+  border-radius: 5px;
+  text-align: center;
+}
+.navIcon{
+  font-size: 3.2rem;
+  color:#333;
+}
+.projectRight{
+  margin:0 0 0 6.5rem;
+}
+.projectRight h4{
+  margin-bottom: 0.5rem;
+  color:#333;
+}
+.projectRight p{
+  color:#333;
+}
+.badge{
+  position:absolute;
+  left:3.2rem;
+  top:1.3rem;
+}
+.headerLeft{
+  padding:1rem 0 0 1rem;
+  font-size: 2rem;
+}
+.headerLeft, .headerLeft a{
+  color:#fff;
+}
+.wrapContent .projectFrom{
+  padding:1.5rem;
+}
+.wrapContent .project h3{
+  padding:1.5rem;
+}
+.project ul li{
+  background:#f7f7f7;
+  padding:0 1.5rem;
+  margin-bottom: 2rem;
+  border-top: 1px solid #eaeaea;
+  border-bottom: 1px solid #eaeaea;
+}
+.project ul li a{
+  color:#333;
+}
+.project ul li p{
+  font-size: 1.4rem;
+}
+.project ul li .title{
+  padding:1rem 0 1rem 0;
+  font-size: 2rem;
+  color:#0088cc;
+}
+.wrapNav ul li{
+  width:50%;
+}
+.wrapNav ul li a{
+  width:100%;
+  font-size: 1.6rem;
+  text-align: center;
+  padding:10px 0;
+}
+.wrapNavR ul li{
+  width:33.3333% !important;
+}
+.wrapContent .proSection{
+  padding:1.5rem;
+}
+.wrapGraphic ul li{
+  float:left;
+  font-size: 1.2rem;
+  margin:1.5rem 0 1.5rem 1.5rem;
+}
+.graphic{
+  width:1rem;
+  height:1rem;
+  border-radius: 0.2rem;
+  display:inline-block;
+}
+.graphicGreen{
+  background:#31c514;
+}
+.graphicBlue{
+  background:#1480c5;
+}
+.graphicGray{
+  background:#adadad;
+}
+.graphicRed{
+  background:#ff0042;
+}
+.projectSeList ul li{
+  margin-bottom: 2rem;
+}
+.projectSection{
+  background:#f7f7f7;
+  font-size: 1.4rem;
+  padding:1rem 1.5rem;
+  border-top: 1px solid #eaeaea;
+  border-bottom: 1px solid #eaeaea;
+}
+.projectSection .title{
+  padding:1rem 0 1rem 0;
+  font-size: 2rem;
+}
+.projectList .openPro{
+  width:100%;
+  background:#e4e4e4;
+  color:#333;
+  padding:0.5rem 0;
+  text-align: center;
+  font-size: 1.4rem;
+  border-top: 1px solid #ddd;
+  border-bottom: 1px solid #ddd;
+  cursor: pointer;
+}
+.projectList .projectDetail{
+  position:relative;
+  margin:1.5rem;
+  font-size: 1.4rem;
+  color:#333;
+  border-bottom: 1px solid #ddd;
+}
+.projectDetail .title{
+  padding:0 0 1rem 0;
+  font-size: 1.6rem;
+  color:#0088cc;
+}
+.projectDetail p{
+  color:#333;
+}
+.projectDetail .trialTip{
+  position:absolute;
+  right:2rem;
+  top:2rem;
+}
+.projectDetailNot{
+  display:none;
+}
+.openProNot{
+  display:none;
+}
+.mT2{
+  margin:2rem 0 0 0;
+}
+.progress-gary, .progress .progress-gary {
+    background-color: #bbb;
+    background-image: -moz-linear-gradient(top, #ccc, #bbb);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#bbb));
+    background-image: -webkit-linear-gradient(top, #ccc, #bbb);
+    background-image: -o-linear-gradient(top, #ccc, #bbb);
+    background-image: linear-gradient(to bottom, #ccc, #bbb);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ccc', endColorstr='#bbb', GradientType=0);
+}
+.projectTable{
+  font-size: 1.4rem;
+  margin-bottom: 2.5rem;
+  border-top: 1px solid #ddd;
+  border-bottom: 1px solid #ddd;
+}
+.projectTable dt{
+  padding:1rem;
+  background:#f0f0f0;
+}
+.projectTable dd b{
+  font-size: 1.6rem;
+}
+.projectTable .table{
+  margin:0;
+}
+.project .filesList ul li{
+  margin:2rem 0 0 0;
+  padding:1rem 1.5rem;
+}
+.filesList .filesListTitle{
+  font-size: 1.8rem;
+  padding:0 0 1rem 0;
+  color:#0088cc;
+}
+.filesDetail{
+  margin:0 1rem;
+  font-size: 1.4rem;
+}
+.filesDetail dt{
+  padding:1.5rem 0;
+  border-bottom: 1px solid #ddd;
+}
+.filesDetail dd{
+  padding:1.5rem 0;
+  border-bottom: 1px solid #ddd;
+}
+.btnOrange{
+  background:#ed8b00;
+  color:#fff;
+  border:1px solid #ed8b00;
+}
+.btnOrange:hover,.btnOrange:focus,.btnOrange:active{
+  background:#ed8b00;
+  color:#fff;
+  border:1px solid #ed8b00;
+}
+.approvalList{
+  margin-bottom: 4.5rem;
+}
+.approvalList ul li{
+  font-size: 1.4rem;
+  padding:1rem;
+  border-bottom: 1px solid #ddd;
+}
+.approvalList .approvalView{
+  padding:1rem 0 0 0;
+}
+.approvalList .approvalImg img{
+  margin:0 1rem 0 0;
+  border:2px solid #ddd;
+  border-radius: 3px;
+}
+.pass{border-color: #009d0e !important;}
+.wait{border-color: #ff9900 !important;}
+.pa2ss{border-color: #999 !important;}
+.unpass{border-color: #f00 !important;}
+.approvalImg .fR{
+  margin-top: 1rem;
+}
+.bottomToolsbar{
+  position:fixed;
+  bottom:0;
+  width:100%;
+  height:5.5rem;
+}
+.bottomToolsbar ul li{
+  float:left;
+  width:50%;
+  height:5.5rem;
+  line-height: 5.5rem;
+  text-align: center;
+}
+.bottomToolsbar ul li button{
+  width:100%;
+  text-align:center;
+  border:none;
+}
+.bottomView{
+  width:100%;
+  background:#fff;
+  display:none;
+}
+.bottomView form{
+  margin:1rem; 
+}
+.bottomView form label{
+  font-size: 1.4rem;
+  margin-bottom: 0.5rem;
+}
+.wrapContent .userInfoList{
+  margin:0 1rem;
+}
+.userInfoList ul li{
+  padding:1.5rem 1rem;
+  font-size: 1.4rem;
+  border-bottom: 1px solid #ddd;
+}
+.userInfoList ul li a{
+  color:#333;
+}
+.userLeft.userTouImg{
+  padding:1.5rem 0 0 0;
+}
+.userRight{
+  text-align: right;
+}
+.userRight span{
+  font-size: 1.6rem;
+  color:#555;
+}
+.p-1{
+  padding:0.5rem 1rem;
+}
+.modalWrap{
+  top:20%;
+}
+.shareList{
+}
+.shareList ul li{
+  font-size: 1.6rem;
+  margin:2rem 0;
+}
+.shareList .shareTitle{
+  background:#f1f1f1;
+  padding:1rem;
+  border-top: 1px solid #ddd;
+  border-bottom: 1px solid #ddd;
+}
+.shareList .shareLink{
+  display:none;
+  padding:1rem;
+  border-bottom: 1px solid #ddd;
+}
+.labelSwitch{
+  display: inline-block;
+  vertical-align: middle;
+  width: 3.8rem;
+  border-radius: 1rem;
+  border:1px solid #ddd;
+  background:#fcfcfc;
+  box-sizing: border-box;
+  height: 2rem;
+  position: relative;
+  cursor: pointer;
+  -webkit-align-self: center;
+  align-self: center;
+}
+.labelSwitch input[type="checkbox"]{
+  display:none;
+}
+.labelSwitch .checkbox{
+  position:absolute;
+  width: 2rem;
+  border-radius: 1rem;
+  box-sizing: border-box;
+  height: 2rem;
+  background: #fff;
+  border:1px solid #ddd;
+  z-index: 0;
+  margin:0;
+  padding:0;
+  top:-1px;
+  cursor: pointer;
+}
+.shareBtn{
+  display:none;
+}
+.modalCont li{
+  padding:1rem 0;
+  border-bottom: 1px solid #ddd;
+}
+.modalCont li:last-child{
+  border-bottom: none;
+};

TEMPAT SAMPAH
global/css/fonts/icomoon.eot


File diff ditekan karena terlalu besar
+ 45 - 42
global/css/fonts/icomoon.svg


TEMPAT SAMPAH
global/css/fonts/icomoon.ttf


TEMPAT SAMPAH
global/css/fonts/icomoon.woff


+ 3 - 1
global/css/icomoon/Read Me.txt

@@ -1,5 +1,7 @@
 Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.
 
+To use the generated font in desktop programs, you can install the TTF font. In order to copy the character associated with each icon, refer to the text box at the bottom right corner of each glyph in demo.html. The character inside this text box may be invisible; but it can still be copied. See this guide for more info: https://icomoon.io/#docs/local-fonts
+
 You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.
 
-You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu > Manage Projects) to retrieve your icon selection.
+You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu  Manage Projects) to retrieve your icon selection.

+ 79 - 75
global/css/icomoon/demo-files/demo.css

@@ -1,157 +1,161 @@
 body {
-	padding: 0;
-	margin: 0;
-	font-family: sans-serif;
-	font-size: 1em;
-	line-height: 1.5;
-	color: #555;
-	background: #fff;
+  padding: 0;
+  margin: 0;
+  font-family: sans-serif;
+  font-size: 1em;
+  line-height: 1.5;
+  color: #555;
+  background: #fff;
 }
 h1 {
-	font-size: 1.5em;
-	font-weight: normal;
+  font-size: 1.5em;
+  font-weight: normal;
 }
 small {
-	font-size: .66666667em;
+  font-size: .66666667em;
 }
 a {
-	color: #e74c3c;
-	text-decoration: none;
+  color: #e74c3c;
+  text-decoration: none;
 }
 a:hover, a:focus {
-	box-shadow: 0 1px #e74c3c;
+  box-shadow: 0 1px #e74c3c;
 }
 .bshadow0, input {
-	box-shadow: inset 0 -2px #e7e7e7;
+  box-shadow: inset 0 -2px #e7e7e7;
 }
 input:hover {
-	box-shadow: inset 0 -2px #ccc;
+  box-shadow: inset 0 -2px #ccc;
 }
 input, fieldset {
-	font-size: 1em;
-	margin: 0;
-	padding: 0;
-	border: 0;
+  font-family: sans-serif;
+  font-size: 1em;
+  margin: 0;
+  padding: 0;
+  border: 0;
 }
 input {
-	color: inherit;
-	line-height: 1.5;
-	height: 1.5em;
-	padding: .25em 0;
+  color: inherit;
+  line-height: 1.5;
+  height: 1.5em;
+  padding: .25em 0;
 }
 input:focus {
-	outline: none;
-	box-shadow: inset 0 -2px #449fdb;
+  outline: none;
+  box-shadow: inset 0 -2px #449fdb;
 }
 .glyph {
-	font-size: 16px;
-	width: 15em;
-	padding-bottom: 1em;
-	margin-right: 4em;
-	margin-bottom: 1em;
-	float: left;
-	overflow: hidden;
+  font-size: 16px;
+  width: 15em;
+  padding-bottom: 1em;
+  margin-right: 4em;
+  margin-bottom: 1em;
+  float: left;
+  overflow: hidden;
 }
 .liga {
-	width: 80%;
-	width: calc(100% - 2.5em);
+  width: 80%;
+  width: calc(100% - 2.5em);
 }
 .talign-right {
-	text-align: right;
+  text-align: right;
 }
 .talign-center {
-	text-align: center;
+  text-align: center;
 }
 .bgc1 {
-	background: #f1f1f1;
+  background: #f1f1f1;
 }
 .fgc1 {
-	color: #999;
+  color: #999;
 }
 .fgc0 {
-	color: #000;
+  color: #000;
 }
 p {
-	margin-top: 1em;
-	margin-bottom: 1em;
+  margin-top: 1em;
+  margin-bottom: 1em;
 }
 .mvm {
-	margin-top: .75em;
-	margin-bottom: .75em;
+  margin-top: .75em;
+  margin-bottom: .75em;
 }
 .mtn {
-	margin-top: 0;
+  margin-top: 0;
 }
 .mtl, .mal {
-	margin-top: 1.5em;
+  margin-top: 1.5em;
 }
 .mbl, .mal {
-	margin-bottom: 1.5em;
+  margin-bottom: 1.5em;
 }
 .mal, .mhl {
-	margin-left: 1.5em;
-	margin-right: 1.5em;
+  margin-left: 1.5em;
+  margin-right: 1.5em;
 }
 .mhmm {
-	margin-left: 1em;
-	margin-right: 1em;
+  margin-left: 1em;
+  margin-right: 1em;
 }
 .mls {
-	margin-left: .25em;
+  margin-left: .25em;
 }
 .ptl {
-	padding-top: 1.5em;
+  padding-top: 1.5em;
 }
 .pbs, .pvs {
-	padding-bottom: .25em;
+  padding-bottom: .25em;
 }
 .pvs, .pts {
-	padding-top: .25em;
-}
-.clearfix {
-	zoom: 1;
+  padding-top: .25em;
 }
 .unit {
-	float: left;
+  float: left;
 }
 .unitRight {
-	float: right;
+  float: right;
 }
 .size1of2 {
-	width: 50%;
+  width: 50%;
 }
 .size1of1 {
-	width: 100%;
+  width: 100%;
 }
 .clearfix:before, .clearfix:after {
-	content: " ";
-	display: table;
+  content: " ";
+  display: table;
 }
 .clearfix:after {
-	clear: both;
+  clear: both;
 }
 .hidden-true {
-	display: none;
+  display: none;
 }
 .textbox0 {
-	width: 3em;
-	background: #f1f1f1;
-	padding: .25em .5em;
-	line-height: 1.5;
-	height: 1.5em;
+  width: 3em;
+  background: #f1f1f1;
+  padding: .25em .5em;
+  line-height: 1.5;
+  height: 1.5em;
 }
 #testDrive {
-	padding-top: 24px;
+  display: block;
+  padding-top: 24px;
+  line-height: 1.5;
 }
 .fs0 {
-	font-size: 16px;
+  font-size: 16px;
 }
 .fs1 {
-	font-size: 32px;
+  font-size: 32px;
 }
 .fs2 {
-	font-size: 32px;
+  font-size: 32px;
 }
 .fs3 {
-	font-size: 32px;
+  font-size: 32px;
+}
+.fs4 {
+  font-size: 28px;
 }
+

+ 22 - 22
global/css/icomoon/demo-files/demo.js

@@ -1,30 +1,30 @@
 if (!('boxShadow' in document.body.style)) {
-	document.body.setAttribute('class', 'noBoxShadow');
+    document.body.setAttribute('class', 'noBoxShadow');
 }
 
 document.body.addEventListener("click", function(e) {
-	var target = e.target;
-	if (target.tagName === "INPUT" &&
-		target.getAttribute('class').indexOf('liga') === -1) {
-		target.select();
-	}
+    var target = e.target;
+    if (target.tagName === "INPUT" &&
+        target.getAttribute('class').indexOf('liga') === -1) {
+        target.select();
+    }
 });
 
 (function() {
-	var fontSize = document.getElementById('fontSize'),
-		testDrive = document.getElementById('testDrive'),
-		testText = document.getElementById('testText');
-	function updateTest() {
-		testDrive.innerHTML = testText.value || String.fromCharCode(160);
-		if (window.icomoonLiga) {
-			window.icomoonLiga(testDrive);
-		}
-	}
-	function updateSize() {
-		testDrive.style.fontSize = fontSize.value + 'px';
-	}
-	fontSize.addEventListener('change', updateSize, false);
-	testText.addEventListener('input', updateTest, false);
-	testText.addEventListener('change', updateTest, false);
-	updateSize();
+    var fontSize = document.getElementById('fontSize'),
+        testDrive = document.getElementById('testDrive'),
+        testText = document.getElementById('testText');
+    function updateTest() {
+        testDrive.innerHTML = testText.value || String.fromCharCode(160);
+        if (window.icomoonLiga) {
+            window.icomoonLiga(testDrive);
+        }
+    }
+    function updateSize() {
+        testDrive.style.fontSize = fontSize.value + 'px';
+    }
+    fontSize.addEventListener('change', updateSize, false);
+    testText.addEventListener('input', updateTest, false);
+    testText.addEventListener('change', updateTest, false);
+    updateSize();
 }());

File diff ditekan karena terlalu besar
+ 745 - 571
global/css/icomoon/demo.html


TEMPAT SAMPAH
global/css/icomoon/fonts/icomoon.eot


File diff ditekan karena terlalu besar
+ 45 - 42
global/css/icomoon/fonts/icomoon.svg


TEMPAT SAMPAH
global/css/icomoon/fonts/icomoon.ttf


TEMPAT SAMPAH
global/css/icomoon/fonts/icomoon.woff


File diff ditekan karena terlalu besar
+ 1138 - 848
global/css/icomoon/selection.json


+ 74 - 63
global/css/icomoon/style.css

@@ -1,148 +1,159 @@
 @font-face {
-	font-family: 'icomoon';
-	src:url('fonts/icomoon.eot?miflbf');
-	src:url('fonts/icomoon.eot?#iefixmiflbf') format('embedded-opentype'),
-		url('fonts/icomoon.woff?miflbf') format('woff'),
-		url('fonts/icomoon.ttf?miflbf') format('truetype'),
-		url('fonts/icomoon.svg?miflbf#icomoon') format('svg');
-	font-weight: normal;
-	font-style: normal;
+  font-family: 'icomoon';
+  src:  url('fonts/icomoon.eot?wueics');
+  src:  url('fonts/icomoon.eot?wueics#iefix') format('embedded-opentype'),
+    url('fonts/icomoon.ttf?wueics') format('truetype'),
+    url('fonts/icomoon.woff?wueics') format('woff'),
+    url('fonts/icomoon.svg?wueics#icomoon') format('svg');
+  font-weight: normal;
+  font-style: normal;
 }
 
 [class^="icon-"], [class*=" icon-"] {
-	font-family: 'icomoon';
-	speak: none;
-	font-style: normal;
-	font-weight: normal;
-	font-variant: normal;
-	text-transform: none;
-	line-height: 1;
+  /* use !important to prevent issues with browser extensions that change fonts */
+  font-family: 'icomoon' !important;
+  speak: none;
+  font-style: normal;
+  font-weight: normal;
+  font-variant: normal;
+  text-transform: none;
+  line-height: 1;
 
-	/* Better Font Rendering =========== */
-	-webkit-font-smoothing: antialiased;
-	-moz-osx-font-smoothing: grayscale;
+  /* Better Font Rendering =========== */
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
 }
 
 .icon-uni42:before {
-	content: "\43";
+  content: "\43";
 }
 .icon-uni43:before {
-	content: "\44";
+  content: "\44";
 }
 .icon-uni47:before {
-	content: "\47";
+  content: "\47";
 }
 .icon-uni4D:before {
-	content: "\4d";
+  content: "\4d";
 }
 .icon-uni4E:before {
-	content: "\4e";
+  content: "\4e";
 }
 .icon-uni4F:before {
-	content: "\4f";
+  content: "\4f";
 }
 .icon-uni50:before {
-	content: "\50";
+  content: "\50";
 }
 .icon-uni52:before {
-	content: "\52";
+  content: "\52";
 }
 .icon-uni53:before {
-	content: "\53";
+  content: "\53";
 }
 .icon-uni54:before {
-	content: "\54";
+  content: "\54";
 }
 .icon-uni55:before {
-	content: "\55";
+  content: "\55";
 }
 .icon-uni56:before {
-	content: "\56";
+  content: "\56";
 }
 .icon-uni57:before {
-	content: "\57";
+  content: "\57";
 }
 .icon-uni58:before {
-	content: "\58";
+  content: "\58";
 }
 .icon-uni59:before {
-	content: "\59";
+  content: "\59";
 }
 .icon-uni5A:before {
-	content: "\5a";
+  content: "\5a";
 }
 .icon-uni61:before {
-	content: "\61";
+  content: "\61";
 }
 .icon-uni62:before {
-	content: "\62";
+  content: "\62";
 }
 .icon-uni63:before {
-	content: "\63";
+  content: "\63";
 }
 .icon-uni64:before {
-	content: "\64";
+  content: "\64";
 }
 .icon-uni65:before {
-	content: "\65";
+  content: "\65";
 }
 .icon-uni66:before {
-	content: "\66";
+  content: "\66";
 }
 .icon-uni67:before {
-	content: "\67";
+  content: "\67";
 }
 .icon-uni68:before {
-	content: "\68";
+  content: "\68";
 }
 .icon-uni69:before {
-	content: "\69";
+  content: "\69";
 }
 .icon-uni6A:before {
-	content: "\6a";
+  content: "\6a";
 }
 .icon-uni6B:before {
-	content: "\6b";
+  content: "\6b";
 }
 .icon-uni6C:before {
-	content: "\6c";
+  content: "\6c";
 }
 .icon-uni6D:before {
-	content: "\6d";
+  content: "\6d";
 }
 .icon-uni6F:before {
-	content: "\6f";
+  content: "\6f";
 }
 .icon-uni70:before {
-	content: "\70";
+  content: "\70";
 }
 .icon-uni71:before {
-	content: "\71";
+  content: "\71";
 }
 .icon-uni72:before {
-	content: "\72";
+  content: "\72";
 }
 .icon-uni73:before {
-	content: "\73";
+  content: "\73";
 }
 .icon-uni74:before {
-	content: "\74";
+  content: "\74";
 }
 .icon-uni75:before {
-	content: "\75";
-}
-.icon-window:before {
-	content: "\49";
-}
-.icon-monitor:before {
-	content: "\48";
+  content: "\75";
 }
 .icon-upload:before {
-	content: "\42";
+  content: "\42";
 }
 .icon-inbox:before {
-	content: "\41";
+  content: "\41";
 }
 .icon-chart:before {
-	content: "\45";
+  content: "\45";
+}
+.icon-monitor:before {
+  content: "\48";
 }
+.icon-window:before {
+  content: "\49";
+}
+.icon-copy:before {
+  content: "\76";
+}
+.icon-font-size:before {
+  content: "\77";
+}
+.icon-share-alt:before {
+  content: "\6e";
+}
+

File diff ditekan karena terlalu besar
+ 2380 - 0
global/js/app/bootstrap.js


File diff ditekan karena terlalu besar
+ 32 - 0
global/js/app/echarts.min.js


+ 38 - 0
global/js/app/global.js

@@ -0,0 +1,38 @@
+$(function(){
+  $(function () {
+    $('[data-toggle="tooltip"]').tooltip()
+  });
+  $('.dropdown-toggle').dropdown();
+  
+  $(".projectSeList li .openPro").click(function(){
+    var projectDetail = $(this).siblings(".projectDetailNot");
+    if(projectDetail.css("display")=="none"){
+      $(this).text("隐藏所有标段");
+      $(this).siblings(".projectDetailNot").slideDown();
+    }else{
+      $(this).text("展开所有标段");
+      $(this).siblings(".projectDetailNot").slideUp();
+    }
+  });
+
+  $(".labelSwitch").click(function(e){
+    if($(e.target).is('input')){
+        return;
+      };
+    var shareBtn = $(this).parents().siblings().children(".shareBtn");
+    var Switch = $(this).parents().siblings(".shareLink");
+    if(Switch.css("display")=="none"){
+      $(this).addClass("Switch");
+      $(this).css("background","#5eb95e");
+      $(this).children(".checkbox").css("left","2rem");
+      $(Switch).slideDown();
+      $(shareBtn).show();
+    }else{
+      $(this).css("background","#fff");
+      $(this).children(".checkbox").css("left","-1px");
+      $(Switch).slideUp();
+      $(shareBtn).hide();
+    }
+  });
+});
+

+ 145 - 1
global/js/bootstrap.js

@@ -1434,4 +1434,148 @@
     })
   })
 
-}(window.jQuery);
+}(window.jQuery);
+/* ========================================================
+ * bootstrap-tab.js v2.3.2
+ * http://twbs.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2013 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+  * ==================== */
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.prototype = {
+
+    constructor: Tab
+
+  , show: function () {
+      var $this = this.element
+        , $ul = $this.closest('ul:not(.dropdown-menu)')
+        , selector = $this.attr('data-target')
+        , previous
+        , $target
+        , e
+
+      if (!selector) {
+        selector = $this.attr('href')
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+      }
+
+      if ( $this.parent('li').hasClass('active') ) return
+
+      previous = $ul.find('.active:last a')[0]
+
+      e = $.Event('show', {
+        relatedTarget: previous
+      })
+
+      $this.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      $target = $(selector)
+
+      this.activate($this.parent('li'), $ul)
+      this.activate($target, $target.parent(), function () {
+        $this.trigger({
+          type: 'shown'
+        , relatedTarget: previous
+        })
+      })
+    }
+
+  , activate: function ( element, container, callback) {
+      var $active = container.find('> .active')
+        , transition = callback
+            && $.support.transition
+            && $active.hasClass('fade')
+
+      function next() {
+        $active
+          .removeClass('active')
+          .find('> .dropdown-menu > .active')
+          .removeClass('active')
+
+        element.addClass('active')
+
+        if (transition) {
+          element[0].offsetWidth // reflow for transition
+          element.addClass('in')
+        } else {
+          element.removeClass('fade')
+        }
+
+        if ( element.parent('.dropdown-menu') ) {
+          element.closest('li.dropdown').addClass('active')
+        }
+
+        callback && callback()
+      }
+
+      transition ?
+        $active.one($.support.transition.end, next) :
+        next()
+
+      $active.removeClass('in')
+    }
+  }
+
+
+ /* TAB PLUGIN DEFINITION
+  * ===================== */
+
+  var old = $.fn.tab
+
+  $.fn.tab = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tab')
+      if (!data) $this.data('tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tab.Constructor = Tab
+
+
+ /* TAB NO CONFLICT
+  * =============== */
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+ /* TAB DATA-API
+  * ============ */
+
+  $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+    e.preventDefault()
+    $(this).tab('show')
+  })
+
+}(window.jQuery);

File diff ditekan karena terlalu besar
+ 32 - 0
global/js/echarts.min.js


+ 57 - 0
protected/class/Hashids/HashGenerator.php

@@ -0,0 +1,57 @@
+<?php
+
+/*
+	
+	Hashids
+	http://hashids.org/php
+	(c) 2013 Ivan Akimov
+	
+	https://github.com/ivanakimov/hashids.php
+	hashids may be freely distributed under the MIT license.
+	
+*/
+
+namespace Hashids;
+
+/**
+ * HashGenerator is a contract for generating hashes
+ */
+interface HashGenerator {
+	
+	/**
+	 * Encodes a variable number of parameters to generate a hash
+	 * 
+	 * @param mixed ...
+	 * 
+	 * @return string the generated hash
+	 */
+	public function encode();
+	
+	/**
+	 * Decodes a hash to the original parameter values
+	 * 
+	 * @param string $hash the hash to decode
+	 * 
+	 * @return array
+	 */
+	public function decode($hash);
+	
+	/**
+	 * Encodes hexadecimal values to generate a hash
+	 * 
+	 * @param string $str hexadecimal string
+	 * 
+	 * @return string the generated hash
+	 */
+	public function encode_hex($str);
+	
+	/**
+	 * Decodes hexadecimal hash
+	 * 
+	 * @param string $hash
+	 * 
+	 * @return string hexadecimal string
+	 */
+	public function decode_hex($hash);
+	
+}

+ 353 - 0
protected/class/Hashids/Hashids.php

@@ -0,0 +1,353 @@
+<?php
+
+/*
+	
+	Hashids
+	http://hashids.org/php
+	(c) 2013 Ivan Akimov
+	
+	https://github.com/ivanakimov/hashids.php
+	hashids may be freely distributed under the MIT license.
+	
+*/
+
+namespace Hashids;
+
+class Hashids {
+	
+	const VERSION = '1.0.5';
+	
+	/* internal settings */
+	
+	const MIN_ALPHABET_LENGTH = 16;
+	const SEP_DIV = 3.5;
+	const GUARD_DIV = 12;
+	
+	/* error messages */
+	
+	const E_ALPHABET_LENGTH = 'alphabet must contain at least %d unique characters';
+	const E_ALPHABET_SPACE = 'alphabet cannot contain spaces';
+	
+	/* set at constructor */
+	
+	private $_alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
+	private $_seps = 'cfhistuCFHISTU';
+	private $_min_hash_length = 0;
+	private $_math_functions = array();
+	private $_max_int_value = 10000000000000;
+	
+	public function __construct($salt = '', $min_hash_length = 0, $alphabet = '') {
+		
+		/* if either math precision library is present, raise $this->_max_int_value */
+		
+		if (function_exists('gmp_add')) {
+			$this->_math_functions['add'] = 'gmp_add';
+			$this->_math_functions['div'] = 'gmp_div';
+			$this->_math_functions['str'] = 'gmp_strval';
+		} else if (function_exists('bcadd')) {
+			$this->_math_functions['add'] = 'bcadd';
+			$this->_math_functions['div'] = 'bcdiv';
+			$this->_math_functions['str'] = 'strval';
+		}
+		
+		$this->_lower_max_int_value = $this->_max_int_value;
+		if ($this->_math_functions) {
+			$this->_max_int_value = PHP_INT_MAX;
+		}
+		
+		/* handle parameters */
+		
+		$this->_salt = $salt;
+		
+		if ((int)$min_hash_length > 0) {
+			$this->_min_hash_length = (int)$min_hash_length;
+		}
+		
+		if ($alphabet) {
+			$this->_alphabet = implode('', array_unique(str_split($alphabet)));
+		}
+		
+		if (strlen($this->_alphabet) < self::MIN_ALPHABET_LENGTH) {
+			throw new \Exception(sprintf(self::E_ALPHABET_LENGTH, self::MIN_ALPHABET_LENGTH));
+		}
+		
+		if (is_int(strpos($this->_alphabet, ' '))) {
+			throw new \Exception(self::E_ALPHABET_SPACE);
+		}
+		
+		$alphabet_array = str_split($this->_alphabet);
+		$seps_array = str_split($this->_seps);
+		
+		$this->_seps = implode('', array_intersect($alphabet_array, $seps_array));
+		$this->_alphabet = implode('', array_diff($alphabet_array, $seps_array));
+		$this->_seps = $this->_consistent_shuffle($this->_seps, $this->_salt);
+		
+		if (!$this->_seps || (strlen($this->_alphabet) / strlen($this->_seps)) > self::SEP_DIV) {
+			
+			$seps_length = (int)ceil(strlen($this->_alphabet) / self::SEP_DIV);
+			
+			if ($seps_length == 1) {
+				$seps_length++;
+			}
+			
+			if ($seps_length > strlen($this->_seps)) {
+				
+				$diff = $seps_length - strlen($this->_seps);
+				$this->_seps .= substr($this->_alphabet, 0, $diff);
+				$this->_alphabet = substr($this->_alphabet, $diff);
+				
+			} else {
+				$this->_seps = substr($this->_seps, 0, $seps_length);
+			}
+			
+		}
+		
+		$this->_alphabet = $this->_consistent_shuffle($this->_alphabet, $this->_salt);
+		$guard_count = (int)ceil(strlen($this->_alphabet) / self::GUARD_DIV);
+		
+		if (strlen($this->_alphabet) < 3) {
+			$this->_guards = substr($this->_seps, 0, $guard_count);
+			$this->_seps = substr($this->_seps, $guard_count);
+		} else {
+			$this->_guards = substr($this->_alphabet, 0, $guard_count);
+			$this->_alphabet = substr($this->_alphabet, $guard_count);
+		}
+		
+	}
+	
+	public function encode() {
+		
+		$ret = '';
+		$numbers = func_get_args();
+		
+		if (func_num_args() == 1 && is_array(func_get_arg(0))) {
+			$numbers = $numbers[0];
+		}
+		
+		if (!$numbers) {
+			return $ret;
+		}
+		
+		foreach ($numbers as $number) {
+			
+			$is_number = ctype_digit((string)$number);
+			
+			if (!$is_number || $number < 0 || $number > $this->_max_int_value) {
+				return $ret;
+			}
+			
+		}
+		
+		return $this->_encode($numbers);
+		
+	}
+	
+	public function decode($hash) {
+		
+		$ret = array();
+		
+		if (!$hash || !is_string($hash) || !trim($hash)) {
+			return $ret;
+		}
+		
+		return $this->_decode(trim($hash), $this->_alphabet);
+		
+	}
+	
+	public function encode_hex($str) {
+		
+		if (!ctype_xdigit((string)$str)) {
+			return '';
+		}
+		
+		$numbers = trim(chunk_split($str, 12, ' '));
+		$numbers = explode(' ', $numbers);
+		
+		foreach ($numbers as $i => $number) {
+			$numbers[$i] = hexdec('1' . $number);
+		}
+		
+		return call_user_func_array(array($this, 'encode'), $numbers);
+		
+	}
+	
+	public function decode_hex($hash) {
+		
+		$ret = "";
+		$numbers = $this->decode($hash);
+		
+		foreach ($numbers as $i => $number) {
+			$ret .= substr(dechex($number), 1);
+		}
+		
+		return $ret;
+		
+	}
+	
+	public function get_max_int_value() {
+		return $this->_max_int_value;
+	}
+	
+	private function _encode(array $numbers) {
+		
+		$alphabet = $this->_alphabet;
+		$numbers_size = sizeof($numbers);
+		$numbers_hash_int = 0;
+		
+		foreach ($numbers as $i => $number) {
+			$numbers_hash_int += ($number % ($i + 100));
+		}
+		
+		$lottery = $ret = $alphabet[$numbers_hash_int % strlen($alphabet)];
+		foreach ($numbers as $i => $number) {
+			
+			$alphabet = $this->_consistent_shuffle($alphabet, substr($lottery . $this->_salt . $alphabet, 0, strlen($alphabet)));
+			$ret .= $last = $this->_hash($number, $alphabet);
+			
+			if ($i + 1 < $numbers_size) {
+				$number %= (ord($last) + $i);
+				$seps_index = $number % strlen($this->_seps);
+				$ret .= $this->_seps[$seps_index];
+			}
+			
+		}
+		
+		if (strlen($ret) < $this->_min_hash_length) {
+			
+			$guard_index = ($numbers_hash_int + ord($ret[0])) % strlen($this->_guards);
+			
+			$guard = $this->_guards[$guard_index];
+			$ret = $guard . $ret;
+			
+			if (strlen($ret) < $this->_min_hash_length) {
+				
+				$guard_index = ($numbers_hash_int + ord($ret[2])) % strlen($this->_guards);
+				$guard = $this->_guards[$guard_index];
+				
+				$ret .= $guard;
+				
+			}
+			
+		}
+		
+		$half_length = (int)(strlen($alphabet) / 2);
+		while (strlen($ret) < $this->_min_hash_length) {
+			
+			$alphabet = $this->_consistent_shuffle($alphabet, $alphabet);
+			$ret = substr($alphabet, $half_length) . $ret . substr($alphabet, 0, $half_length);
+			
+			$excess = strlen($ret) - $this->_min_hash_length;
+			if ($excess > 0) {
+				$ret = substr($ret, $excess / 2, $this->_min_hash_length);
+			}
+			
+		}
+		
+		return $ret;
+		
+	}
+	
+	private function _decode($hash, $alphabet) {
+		
+		$ret = array();
+		
+		$hash_breakdown = str_replace(str_split($this->_guards), ' ', $hash);
+		$hash_array = explode(' ', $hash_breakdown);
+		
+		$i = 0;
+		if (sizeof($hash_array) == 3 || sizeof($hash_array) == 2) {
+			$i = 1;
+		}
+		
+		$hash_breakdown = $hash_array[$i];
+		if (isset($hash_breakdown[0])) {
+			
+			$lottery = $hash_breakdown[0];
+			$hash_breakdown = substr($hash_breakdown, 1);
+			
+			$hash_breakdown = str_replace(str_split($this->_seps), ' ', $hash_breakdown);
+			$hash_array = explode(' ', $hash_breakdown);
+			
+			foreach ($hash_array as $sub_hash) {
+				$alphabet = $this->_consistent_shuffle($alphabet, substr($lottery . $this->_salt . $alphabet, 0, strlen($alphabet)));
+				$ret[] = (int)$this->_unhash($sub_hash, $alphabet);
+			}
+			
+			if ($this->_encode($ret) != $hash) {
+				$ret = array();
+			}
+			
+		}
+		
+		return $ret;
+		
+	}
+	
+	private function _consistent_shuffle($alphabet, $salt) {
+		
+		if (!strlen($salt)) {
+			return $alphabet;
+		}
+		
+		for ($i = strlen($alphabet) - 1, $v = 0, $p = 0; $i > 0; $i--, $v++) {
+			
+			$v %= strlen($salt);
+			$p += $int = ord($salt[$v]);
+			$j = ($int + $v + $p) % $i;
+			
+			$temp = $alphabet[$j];
+			$alphabet[$j] = $alphabet[$i];
+			$alphabet[$i] = $temp;
+			
+		}
+		
+		return $alphabet;
+		
+	}
+	
+	private function _hash($input, $alphabet) {
+		
+		$hash = '';
+		$alphabet_length = strlen($alphabet);
+		
+		do {
+			
+			$hash = $alphabet[$input % $alphabet_length] . $hash;
+			if ($input > $this->_lower_max_int_value && $this->_math_functions) {
+				$input = $this->_math_functions['str']($this->_math_functions['div']($input, $alphabet_length));
+			} else {
+				$input = (int)($input / $alphabet_length);
+			}
+			
+		} while ($input);
+		
+		return $hash;
+		
+	}
+	
+	private function _unhash($input, $alphabet) {
+		
+		$number = 0;
+		if (strlen($input) && $alphabet) {
+			
+			$alphabet_length = strlen($alphabet);
+			$input_chars = str_split($input);
+			
+			foreach ($input_chars as $i => $char) {
+				
+				$pos = strpos($alphabet, $char);
+				if ($this->_math_functions) {
+					$number = $this->_math_functions['str']($this->_math_functions['add']($number, $pos * pow($alphabet_length, (strlen($input) - $i - 1))));
+				} else {
+					$number += $pos * pow($alphabet_length, (strlen($input) - $i - 1));
+				}
+				
+			}
+			
+		}
+		
+		return $number;
+		
+	}
+	
+}

+ 2 - 7
protected/class/attfile.php

@@ -12,9 +12,9 @@ class attFile
         $this->__file = new fileup();
     }
 
-    public function insertFile($pid, $stid, $mpid, $pmid, $numpname, $auditoruid, $filepath, $ziphashcode = 0, $filehashcode = 0, $times = 0)
+    public function insertFile($pid, $stid, $mpid, $pmid, $numpname, $auditoruid, $filepath, $ziphashcode = 0, $filehashcode = 0, $times = 0,$isnew = 2)
     {
-        return $this->__file->createFile($pid, $stid, $mpid, $pmid, $numpname, $auditoruid, $filepath, $ziphashcode = 0, $filehashcode, 2, $times);
+        return $this->__file->createFile($pid, $stid, $mpid, $pmid, $numpname, $auditoruid, $filepath, $ziphashcode = 0, $filehashcode, $isnew, $times);
     }
 
     public function getMaxRow()
@@ -32,11 +32,6 @@ class attFile
         return $this->__file->getOne(array('where' => 'pmid=? and numpname=? and times=?  and isnew=2', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));
     }
 
-    public function getOrgin($pmid, $numpname, $times = 0)
-    {
-        return $this->__file->find(array('where' => 'pmid=? and numpname=? and times=?  and isnew=1', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));
-    }
-
     public function getNewLast3($pmid, $numpname, $times = 0)
     {
         return $this->__file->getOne(array('where' => 'pmid=? and numpname=? and times=?  and isnew=2', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));

+ 10 - 0
protected/class/contractact.php

@@ -90,4 +90,14 @@ class Contractact
         return $this->random($lenth, '123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ');
     }
 
+    public function getNumRow($pid)
+    {
+        return $this->__mcontract->count(array('where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE));
+    }
+
+    public function del($stid)
+    {
+        return $this->__mcontract->delete(array('where' => 'stid=?', 'param' => array($stid)));
+    }
+
 }

+ 3 - 12
protected/class/itemmeasurenum.php

@@ -21,12 +21,7 @@ class ItemMeasureNumpofper
         $this->__itemMeasureNum->pmid = $postArray['pmid'];
         $this->__itemMeasureNum->isdel = 0;
         $this->__itemMeasureNum->deltime = 0;
-        if(isset($postArray['categoryid'])){
-          $this->__itemMeasureNum->categoryid = $postArray['categoryid'];
-        }else{
-          $this->__itemMeasureNum->categoryid = 0;
-        }
-        $this->__itemMeasureNum->deluid = 0;
+        $this->__itemMeasureNum->categoryid = $postArray['categoryid'];
         $this->__itemMeasureNum->tips = $postArray['tips'];
         $this->__itemMeasureNum->numpname = $postArray['numpname'];
         $this->__itemMeasureNum->intime = time();
@@ -80,13 +75,9 @@ class ItemMeasureNumpofper
         return $this->__itemMeasureNum->getOne(array('where' => 'imnid=?', 'param' => array($imnid), 'asArray' => TRUE));
     }
 
-    public function updateItemFields($id, $tips, $encode = 1)
+    public function updateItemFields($id, $tips)
     {
-        if ($encode == 1) {
-            $this->__itemMeasureNum->tips = iconv('GBK', 'UTF-8', $tips);
-        } else {
-            $this->__itemMeasureNum->tips = $tips;
-        }
+        $this->__itemMeasureNum->tips = iconv('GBK', 'UTF-8', $tips);
         return $this->__itemMeasureNum->update(array('where' => 'imnid=?', 'param' => array($id)));
     }
 

+ 25 - 0
protected/class/measureauditact.php

@@ -142,6 +142,31 @@ class MeasureauditAct
         return $this->__measureaudit->find(array('where' => '(mastatus=\'checking\') and auditoruid=?', 'groupby' => 'pmid,numpname', 'param' => array($audituid), 'asArray' => TRUE));
     }
 
+    public function getCheckedRowbyUID3($audituid)
+    {
+        return $this->__measureaudit->find(array('where' => '(mastatus=\'checked\' or mastatus=\'checkno\') and auditoruid=?', 'groupby' => 'pid', 'desc' => 'audittime','param' => array($audituid), 'asArray' => TRUE));
+    }
+
+    public function getCheckedRowbyUID4($audituid,$pid)
+    {
+        return $this->__measureaudit->find(array('where' => '(mastatus=\'checked\' or mastatus=\'checkno\') and auditoruid=? and pid=?', 'groupby' => 'stid', 'desc' => 'audittime','param' => array($audituid,$pid), 'asArray' => TRUE));
+    }
+
+    public function getCheckedRowbyUID5($audituid,$pid,$stid)
+    {
+        return $this->__measureaudit->find(array('where' => '(mastatus=\'checked\' or mastatus=\'checkno\') and auditoruid=? and pid=? and stid=?', 'groupby' => 'pmid', 'desc' => 'audittime','param' => array($audituid,$pid,$stid), 'asArray' => TRUE));
+    }
+
+    public function getCheckedRowbyUID6($audituid)
+    {
+        return $this->__measureaudit->find(array('select' => 'pid', 'where' => '(mastatus=\'checking\') and auditoruid=?', 'groupby' => 'pid', 'param' => array($audituid), 'asArray' => TRUE));
+    }
+
+    public function getCheckedRowbyUID7($audituid,$pid)
+    {
+        return $this->__measureaudit->find(array('where' => '(mastatus=\'checking\') and auditoruid=? and pid=?', 'groupby' => 'pmid,numpname', 'param' => array($audituid,$pid), 'asArray' => TRUE));
+    }
+
     public function getMyRecord($audituid)
     {
         Doo::db()->connect();

+ 91 - 115
protected/class/numofperact.php

@@ -7,19 +7,15 @@ Doo::loadModel('numofper');
  *
  * @author zongheng
  */
-class NumofperAct
-{
+class NumofperAct {
 
     private $__numofperact;
 
-    function __construct()
-    {
+    function __construct() {
         $this->__numofperact = new Numofper();
     }
 
-    public function insert($pid, $uid, $tenderid, $stid, $phaseno, $currcontractval, $currchangeval, $stopnowtotal, $currdone, $curralltotal, $times = 0)
-    {
-        $this->__numofperact->iszero = 0;
+    public function insert($pid, $uid, $tenderid, $stid, $phaseno, $currcontractval, $currchangeval, $stopnowtotal, $currdone, $curralltotal, $times = 0) {
         $this->__numofperact->uid = $uid;
         $this->__numofperact->pid = $pid;
         $this->__numofperact->pmid = $tenderid;
@@ -37,8 +33,7 @@ class NumofperAct
         return $this->__numofperact->insert();
     }
 
-    public function redoRow($pid, $tenderid, $stid, $phaseno, $times)
-    {
+    public function redoRow($pid, $tenderid, $stid, $phaseno, $times) {
         $this->__numofperact->pid = $pid;
         $this->__numofperact->pmid = $tenderid;
         $this->__numofperact->stid = $stid;
@@ -55,91 +50,75 @@ class NumofperAct
         return $this->__numofperact->insert();
     }
 
-    public function getRowByMpid($mpid)
-    {
+    public function getRowByMpid($mpid) {
         return $this->__numofperact->getOne(array('where' => 'mpid=?', 'param' => array($mpid), 'asArray' => TRUE));
     }
 
-    public function getCountTotalnum($pmid)
-    {
+    public function getCountTotalnum($pmid) {
         return $this->__numofperact->count(array('where' => 'pmid=? and currstatus != \'checkno\' ', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getCountTotalnum2($pmid)
-    {
+    public function getCountTotalnum2($pmid) {
         return $this->__numofperact->getOne(array('select' => 'numpname', 'where' => 'pmid=?', 'param' => array($pmid), 'groupby' => 'numpname', 'desc' => 'numpname', 'asArray' => TRUE));
     }
 
-    public function getMaxStatusTimes($pmid, $numpname)
-    {
+    public function getMaxStatusTimes($pmid, $numpname) {
         return $this->__numofperact->getOne(array('select' => 'currstatus', 'where' => 'pmid=? and numpname=?', 'param' => array($pmid, $numpname), 'desc' => 'times', 'asArray' => TRUE));
     }
 
     // for API
-    public function getMaxTimes($pmid, $numpname)
-    {
+    public function getMaxTimes($pmid, $numpname) {
         return $this->__numofperact->getOne(array('select' => 'times,currstatus', 'where' => 'pmid=? and numpname=?', 'param' => array($pmid, $numpname), 'desc' => 'times', 'asArray' => TRUE));
     }
 
-    public function getCountTotalplus($pmid)
-    {
+    public function getCountTotalplus($pmid) {
         return $this->__numofperact->getOne(array('select' => 'sum(curralltotal) as totalplus', 'where' => 'pmid=?', 'groupby' => 'numpname', 'desc' => 'times', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getStopNow($pmid)
-    {
+    public function getStopNow($pmid) {
         return $this->__numofperact->getOne(array('select' => 'sum(stopnowtotal) as sntotal', 'where' => 'pmid=?', 'groupby' => 'numpname', 'desc' => 'times', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getStopNowTotal($pmid)
-    {
+    public function getStopNowTotal($pmid) {
         return $this->__numofperact->getOne(array('select' => 'stopnowtotal as sntotal', 'where' => 'pmid=?', 'groupby' => 'pmid,numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getStopNowSt($stid)
-    {
+    public function getStopNowSt($stid) {
         return $this->__numofperact->getOne(array('select' => 'sum(stopnowtotal) as sntotal', 'where' => 'stid=?', 'param' => array($stid), 'asArray' => TRUE));
     }
 
-    public function getStopNowT($pmid)
-    {
+    public function getStopNowT($pmid) {
         return $this->__numofperact->getOne(array('select' => 'sum(stopnowtotal) as sntotal', 'where' => 'pmid=?', 'param' => array($pmid), 'DESC' => 'audittime', 'asArray' => TRUE));
     }
 
-    public function getCurrDoneSt($stid)
-    {
+    public function getCurrDoneSt($stid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currdone) as currdone', 'where' => 'stid=?', 'param' => array($stid), 'asArray' => TRUE));
     }
 
-    public function getCurrDonePmid($pmid)
-    {
+    public function getCurrDonePmid($pmid) {
         return $this->__numofperact->getOne(array('select' => 'currdone as currdone', 'where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getCurrTotal($pmid)
-    {
+    public function getCurrTotal($pmid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currcontractval) as currtotal', 'where' => 'pmid=?', 'groupby' => 'numpname', 'desc' => 'times', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getCurrAlltotal($pmid)
-    {
+    public function getCurrAlltotal($pmid) {
         return $this->__numofperact->getOne(array('select' => 'currdone as currtotal', 'where' => 'pmid=?', 'param' => array($pmid), 'groupby' => 'pmid,numpname', 'desc' => 'numpname', 'asArray' => TRUE));
     }
 
-    public function getCurrdoneNew($pmid)
-    {
+    public function getCurrdoneNew($pmid) {
         return $this->__numofperact->getOne(array('select' => 'currdone as currtotal', 'where' => 'pmid=?', 'param' => array($pmid), 'desc' => 'mpid', 'asArray' => TRUE));
     }
 
-    public function getCountTotalSTID($stid)
-    {
+    public function getCountTotalSTID($stid) {
         return $this->__numofperact->getOne(array('select' => 'sum(curralltotal) as totalplus', 'where' => 'stid=? and currstatus != \'checkno\'', 'param' => array($stid), 'asArray' => TRUE));
     }
 
-    public function getCountTotalSTID2($stid)
-    {
+    public function getCountTotalSTID2($stid) {
         $pdArray = NULL;
         $pdArray = $this->getPMID($stid);
+        $totalPlus = 0;
         if ($pdArray)
             foreach ($pdArray as $value) {
                 $t = $this->getMaxNumORTimes($value['pmid']);
@@ -149,90 +128,73 @@ class NumofperAct
     }
 
 // 根据条件STID获取分组后的PMID
-    public function getPMID($stid)
-    {
+    public function getPMID($stid) {
         return $this->__numofperact->find(array('select' => 'pmid', 'where' => 'stid=? and currstatus != \'checkno\'', 'groupby' => 'pmid', 'param' => array($stid), 'asArray' => TRUE));
     }
 
 // 根据条件STID获取分组后的PMID
-    public function getMaxNumORTimes($pmid)
-    {
-        $pmidArray = $this->__numofperact->getOne(array('where' => 'pmid=?', 'param' => array($pmid), 'desc' => 'mpid', 'asArray' => TRUE));
+    public function getMaxNumORTimes($pmid) {
+        $pmidArray = $this->__numofperact->getOne(array('where' => 'pmid=? and currstatus != \'checkno\'', 'param' => array($pmid), 'desc' => 'mpid', 'asArray' => TRUE));
         return $pmidArray['curralltotal'];
     }
 
-    public function getNumByStid($stid)
-    {
+    public function getNumByStid($stid) {
         return $this->__numofperact->find(array('where' => 'stid=?', 'param' => array($stid), 'desc' => 'mpid', 'asArray' => TRUE));
     }
 
-    public function getRowByPmid($pmid)
-    {
+    public function getRowByPmid($pmid) {
         return $this->__numofperact->find(array('where' => 'pmid=? and currstatus != \'checkno\'', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getGroupByLastOne($pmid)
-    {
+    public function getGroupByLastOne($pmid) {
         return $this->__numofperact->find(array('where' => 'pmid=? and currstatus!=\'checkno\'', 'groupby' => 'numpname', 'desc' => 'numpname,times', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getGroupByLastOne2($pmid)
-    {
+    public function getGroupByLastOne2($pmid) {
         return $this->__numofperact->find(array('where' => 'pmid=?', 'groupby' => 'numpname', 'desc' => 'numpname,times', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getRowByPmid2($pmid)
-    {
+    public function getRowByPmid2($pmid) {
         return $this->__numofperact->find(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
-    public function getRowTender($pmid)
-    {
+    public function getRowTender($pmid) {
         return $this->__numofperact->find(array('where' => 'pmid=?', 'orderby' => 'numpname', 'param' => array($pmid), 'desc' => 'mpid', 'asArray' => TRUE));
     }
 
-    public function getRowTender2($pmid)
-    {
+    public function getRowTender2($pmid) {
         return $this->__numofperact->getOne(array('where' => 'pmid=?', 'orderby' => 'numpname', 'param' => array($pmid), 'desc' => 'mpid', 'asArray' => TRUE));
     }
 
-    public function getRowTenderCurr($pmid)
-    {
+    public function getRowTenderCurr($pmid) {
         return $this->__numofperact->find(array('where' => 'numpname=(SELECT max(numpname) FROM jl_measure_numofper where pmid=?) and pmid=?', 'orderby' => 'numpname', 'param' => array($pmid, $pmid), 'desc' => 'mpid', 'asArray' => TRUE));
     }
 
-    public function getAlluserMeasureAudit($bid, $num)
-    {
+    public function getAlluserMeasureAudit($bid, $num) {
         return $this->__numofperact->getOne(array('select' => 'mpid', 'where' => 'pmid=? and numpname=?', 'param' => array($bid, $num), 'asArray' => TRUE));
     }
 
-    public function getNumOfStatus($bid, $num)
-    {
+    public function getNumOfStatus($bid, $num) {
         return $this->__numofperact->getOne(array('where' => 'pmid=? and numpname=?', 'param' => array($bid, $num), 'asArray' => TRUE));
     }
 
-    public function getCurrStatus($mpid)
-    {
+    public function getCurrStatus($mpid) {
         return $this->__numofperact->getOne(array('where' => 'mpid=?', 'param' => array($mpid), 'asArray' => TRUE));
     }
 
-    public function getRow($pmid, $numpname, $times = 0)
-    {
+    public function getRow($pmid, $numpname, $times = 0) {
         return $this->__numofperact->getOne(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));
     }
 
-    public function hasTheTimesRow($pmid, $numpname, $times = 0)
-    {
+    public function hasTheTimesRow($pmid, $numpname, $times = 0) {
         return $this->__numofperact->count(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));
     }
 
-    public function getMaxRowStatus($pmid, $numpname)
-    {
+    public function getMaxRowStatus($pmid, $numpname) {
         return $this->__numofperact->getOne(array('where' => 'pmid=? and numpname=?', 'param' => array($pmid, $numpname), 'desc' => 'times', 'asArray' => TRUE));
     }
 
-    public function getChecknoRow($pmid, $numpname)
-    {
+    public function getChecknoRow($pmid, $numpname) {
         return $this->__numofperact->getOne(array('where' => 'pmid=? and numpname=?', 'desc' => 'times', 'param' => array($pmid, $numpname), 'asArray' => TRUE));
     }
 
@@ -240,68 +202,56 @@ class NumofperAct
 //	return $this->__numofperact->getOne(array('where' => 'numpname=(SELECT max(numpname) FROM jl_measure_numofper where pid=? and  pmid=? and stid=?)', 'param' => array($pid, $pmid, $stid), 'asArray' => TRUE));
 //    }
 
-    public function getLastStatus($pid, $pmid)
-    {
+    public function getLastStatus($pid, $pmid) {
         return $this->__numofperact->getOne(array('where' => 'pid=? and pmid=? and currstatus != \'checkno\'', 'desc' => 'numpname', 'param' => array($pid, $pmid), 'asArray' => TRUE));
     }
 
-    public function getLastStatus2($pid, $pmid)
-    {
+    public function getLastStatus2($pid, $pmid) {
         return $this->__numofperact->getOne(array('where' => 'pid=? and pmid=?', 'groupby' => 'pmid,numpname,times', 'desc' => 'times', 'param' => array($pid, $pmid), 'asArray' => TRUE));
     }
 
-    public function getLastStatus3($pid, $pmid)
-    {
+    public function getLastStatus3($pid, $pmid) {
         return $this->__numofperact->getOne(array('where' => 'pid=? and pmid=?', 'desc' => 'numpname', 'param' => array($pid, $pmid), 'asArray' => TRUE));
     }
 
-    public function getLastRow($pid, $pmid)
-    {
+    public function getLastRow($pid, $pmid) {
         return $this->__numofperact->getOne(array('where' => 'pid=? and pmid=?', 'groupby' => 'numpname,times', 'desc' => 'mpid', 'param' => array($pid, $pmid), 'asArray' => TRUE));
     }
 
-    public function getChangTotal($pid)
-    {
+    public function getChangTotal($pid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currchangeval) as changtotal', 'where' => 'pid=? and currstatus != \'checkno\'', 'param' => array($pid), 'asArray' => TRUE))['changtotal'];
     }
 
-    public function getCurrDone($pid)
-    {
+    public function getCurrDone($pid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currdone) as currdone', 'where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE))['currdone'];
     }
 
-    public function getCurrDoneNow($pid)
-    {
+    public function getCurrDoneNow($pid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currdone) as currdone', 'where' => 'pid=? and currstatus!=\'checkno\'', 'param' => array($pid), 'asArray' => TRUE))['currdone'];
     }
 
-    public function getCheckedCurrdone($stid)
-    {
+    public function getCheckedCurrdone($stid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currdone) as currdone', 'where' => 'stid = ?', 'param' => array($stid), 'asArray' => TRUE))['currdone'];
     }
 
-    public function getMaxCurrStatus($pid, $pmid, $stid)
-    {
+    public function getMaxCurrStatus($pid, $pmid, $stid) {
         return $this->__numofperact->getOne(array('where' => 'numpname = (SELECT max(numpname) FROM jl_measure_numofper where pid = ? and pmid = ? and stid = ?)', 'param' => array($pid, $pmid, $stid), 'asArray' => TRUE));
     }
 
     //标段下最新一期
-    public function getLastNew($pmid)
-    {
+    public function getLastNew($pmid) {
         return $this->__numofperact->getOne(array('select' => 'stopnowtotal, currdone', 'where' => 'pmid = ?', 'groupby' => 'pmid, numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
 //	return $this->__numofperact->getOne(array('select' => 'stopnowtotal, currdone', 'where' => 'pmid = ? and currstatus!=\'checkno\'', 'orderby' => 'numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
     //标段下最新一期
-    public function getLastNew2($pmid)
-    {
+    public function getLastNew2($pmid) {
         return $this->__numofperact->getOne(array('where' => 'pmid = ?', 'groupby' => 'pmid, numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
 //	return $this->__numofperact->getOne(array('select' => 'stopnowtotal, currdone', 'where' => 'pmid = ? and currstatus!=\'checkno\'', 'orderby' => 'numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
     }
 
     //更新数据
-    public function updateNumofper($tenderid, $phaseno, $itemArray, $times = 0)
-    {
+    public function updateNumofper($tenderid, $phaseno, $itemArray, $times = 0) {
         if (!is_array($itemArray)) {
             return FALSE;
         }
@@ -314,8 +264,7 @@ class NumofperAct
     }
 
     //更新数据
-    public function updateAuditStatus($tenderid, $phaseno, $statuno = 'checking', $times = 0)
-    {
+    public function updateAuditStatus($tenderid, $phaseno, $statuno = 'checking', $times = 0) {
         $this->__numofperact->currstatus = $statuno;
         $this->__numofperact->audittime = time();
         return $this->__numofperact->update(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($tenderid, $phaseno, $times)));
@@ -324,31 +273,58 @@ class NumofperAct
 //    public function getCurrdoneSTID($stid) {
 //	return $this->__numofperact->getOne(array('select' => 'sum(currdone) as totalplus', 'where' => 'stid=?', 'param' => array($stid), 'asArray' => TRUE));
 //    }
-    public function getCurrdoneSTID($stid)
-    {
+    public function getCurrdoneSTID($stid) {
         return $this->__numofperact->getOne(array('select' => 'sum(currdone) as totalplus', 'where' => 'stid=?  and currstatus!=\'checkno\'', 'param' => array($stid), 'asArray' => TRUE));
     }
 
-    public function getCurrDoneSMontht($stid)
-    {
+    public function getCurrDoneSMontht($stid) {
         return $this->__numofperact->find(array('select' => 'sum(currdone) as currdone,FROM_UNIXTIME(audittime,"%Y-%m") as month', 'where' => 'stid=?'
-        , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(audittime,"%Y-%m")', 'asc' => 'audittime', 'asArray' => TRUE));
+                    , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(audittime,"%Y-%m")', 'asc' => 'audittime', 'asArray' => TRUE));
     }
 
-    public function getStopNowStMonth($stid)
-    {
+    public function getStopNowStMonth($stid) {
         return $this->__numofperact->find(array('select' => 'sum(stopnowtotal) as sntotal,FROM_UNIXTIME(audittime,"%Y-%m") as month', 'where' => 'stid=? '
+                    , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(audittime,"%Y-%m")', 'asc' => 'audittime', 'asArray' => TRUE));
+    }
+
+    public function getCurrTotalStMonth($stid) {
+        return $this->__numofperact->find(array('select' => 'sum(curralltotal) as currtotal,FROM_UNIXTIME(audittime,"%Y-%m") as month', 'where' => 'stid=? '
         , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(audittime,"%Y-%m")', 'asc' => 'audittime', 'asArray' => TRUE));
     }
 
-    public function getCountTimes($pmid, $numpname, $times)
-    {
+    public function getCountTimes($pmid, $numpname, $times) {
         return $this->__numofperact->count(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times)));
     }
 
-    public function getCountNumpname($pmid, $numpname)
-    {
+    public function getCountNumpname($pmid, $numpname) {
         return $this->__numofperact->count(array('where' => 'pmid=? and numpname=?', 'param' => array($pmid, $numpname)));
     }
 
+
+    public function getCurrDonePmMonth($pmid) {
+        return $this->__numofperact->find(array('select' => 'sum(currdone) as currdone,FROM_UNIXTIME(intime,"%Y-%m") as month', 'where' => 'pmid=? and currstatus!=\'checkno\''
+        , 'param' => array($pmid), 'groupby' => 'FROM_UNIXTIME(intime,"%Y-%m")', 'asc' => 'intime', 'asArray' => TRUE));
+    }
+
+    public function getCurrTotalPmMonth($pmid) {
+        return $this->__numofperact->find(array('select' => 'sum(curralltotal) as currtotal,FROM_UNIXTIME(intime,"%Y-%m") as month', 'where' => 'pmid=? and currstatus!=\'checkno\''
+        , 'param' => array($pmid), 'groupby' => 'FROM_UNIXTIME(intime,"%Y-%m")', 'asc' => 'intime', 'asArray' => TRUE));
+    }
+
+    public function getCurrDoneStMonthNoCheckno($stid) {
+        return $this->__numofperact->find(array('select' => 'sum(currdone) as currdone,FROM_UNIXTIME(intime,"%Y-%m") as month', 'where' => 'stid=? and currstatus!=\'checkno\''
+        , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(intime,"%Y-%m")', 'asc' => 'intime', 'asArray' => TRUE));
+    }
+
+
+    public function getCurrTotalStMonthNoCheckno($stid) {
+        $sql = 'SELECT sum(curralltotal) as currtotal,FROM_UNIXTIME(intime,"%Y-%m") as month FROM (SELECT max(mpid) as mpid,max(cast(`curralltotal` as DECIMAL)) as curralltotal,max(intime) as intime FROM `jl_measure_numofper` WHERE stid='.$stid.' AND currstatus!=\'checkno\' GROUP BY pmid) as tmptable GROUP BY FROM_UNIXTIME(intime,"%Y-%m") ORDER BY intime ASC';
+        $query = Doo::db ()->query ( $sql );
+
+        $result = $query->fetchAll ();
+
+        return $result;
+//        return $this->__numofperact->find(array('select' => 'sum(curralltotal) as currtotal,FROM_UNIXTIME(intime,"%Y-%m") as month', 'where' => 'stid=? and currstatus!=\'checkno\''
+//        , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(intime,"%Y-%m")', 'asc' => 'intime', 'asArray' => TRUE));
+    }
 }

+ 2 - 15
protected/class/profile.php

@@ -20,6 +20,7 @@ class Profile
         $this->uprofile->name = filter_var($intp['realname'], FILTER_SANITIZE_STRING);
         $this->uprofile->company = filter_var($intp['company'], FILTER_SANITIZE_STRING);
         $this->uprofile->jobs = filter_var($intp['jobs'], FILTER_SANITIZE_STRING);
+        $this->uprofile->remark = filter_var($intp['remark'], FILTER_SANITIZE_STRING);
         $this->uprofile->phone = filter_var($intp['phone'], FILTER_SANITIZE_STRING);
 //        $this->uprofile->mobile = filter_var($intp['mobile'], FILTER_SANITIZE_STRING);
         if (isset($intp['qq']))
@@ -28,21 +29,6 @@ class Profile
         return $this->uprofile->insert();
     }
 
-    public function ZGinsertProfile($uid = 0, $realname)
-    {
-        if (!isset($uid))
-            return FALSE;
-        $this->uprofile->userid = $uid;
-        $this->uprofile->name = $realname;
-        $this->uprofile->company = '';
-        $this->uprofile->jobs = '';
-        $this->uprofile->phone = '';
-        $this->uprofile->mobile = '';
-        $this->uprofile->qq = '';
-        $this->uprofile->groups = 'vip';
-        return $this->uprofile->insert();
-    }
-
     public function getProWithUid($userid = 0)
     {
         if (!isset($userid))
@@ -70,6 +56,7 @@ class Profile
         $this->uprofile->name = $proArray['name'];
         $this->uprofile->company = $proArray['company'];
         $this->uprofile->jobs = $proArray['jobs'];
+        $this->uprofile->remark = $proArray['remark'];
         $this->uprofile->phone = $proArray['phone'];
         $this->uprofile->mobile = $proArray['mobile'];
         if (isset($proArray['qq']) && $proArray['qq'])

+ 37 - 25
protected/class/project.php

@@ -2,49 +2,61 @@
 
 Doo::loadModel('pro');
 
-class Project {
+class Project
+{
 
     private $pro;
 
-    public function __construct() {
-	$this->pro = new Pro();
+    public function __construct()
+    {
+        $this->pro = new Pro();
     }
 
-    public function insertProject($uid, $pname) {
-	if (!isset($pname) && $pname)
-	    return FALSE;
-	$this->pro->uid = filter_var($uid, FILTER_VALIDATE_INT);
-	$this->pro->pname = filter_var($pname, FILTER_SANITIZE_STRING);
-	$this->pro->intime = time();
-	return $this->pro->insert();
+    public function insertProject($uid, $pname)
+    {
+        if (!isset($pname) && $pname)
+            return FALSE;
+        $this->pro->uid = filter_var($uid, FILTER_VALIDATE_INT);
+        $this->pro->pname = filter_var($pname, FILTER_SANITIZE_STRING);
+        $this->pro->intime = time();
+        return $this->pro->insert();
     }
 
-    public function getAll($uid = NULL) {
-	if (isset($uid)) {
-	    return $this->pro->find(array('where' => 'uid=?', 'param' => array($uid), 'asArray' => TRUE));
-	} else {
-	    return $this->pro->find(array('asArray' => TRUE));
-	}
+    public function getAll($uid = NULL)
+    {
+        if (isset($uid)) {
+            return $this->pro->find(array('where' => 'uid=?', 'param' => array($uid), 'asArray' => TRUE));
+        } else {
+            return $this->pro->find(array('asArray' => TRUE));
+        }
     }
 
-    public function getFewRow($pidstr) {
-	return $this->pro->find(array('where' => 'pid in(' . $pidstr . ')', 'asArray' => TRUE));
+    public function getFewRow($pidstr)
+    {
+        return $this->pro->find(array('where' => 'pid in(' . $pidstr . ')', 'asArray' => TRUE));
     }
 
-    public function getRowByPid($pid) {
-	return $this->pro->getOne(array('where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE));
+    public function getRowByPid($pid)
+    {
+        return $this->pro->getOne(array('where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE));
     }
 
 // for api
-    public function getRowUid($uid) {
-	return $this->pro->find(array('where' => 'uid=?', 'param' => array($uid), 'asArray' => TRUE));
+    public function getRowUid($uid)
+    {
+        return $this->pro->find(array('where' => 'uid=?', 'param' => array($uid), 'asArray' => TRUE));
     }
 
-    public function updateProName($pid, $pname) {
-	$this->pro->pname = filter_var($pname, FILTER_SANITIZE_STRING);
-	return $this->pro->update(array('where' => 'pid=?', 'param' => array($pid)));
+    public function updateProName($pid, $pname)
+    {
+        $this->pro->pname = filter_var($pname, FILTER_SANITIZE_STRING);
+        return $this->pro->update(array('where' => 'pid=?', 'param' => array($pid)));
     }
 
+    public function del($pid)
+    {
+        return $this->pro->delete(array('where' => 'pid=?', 'param' => array($pid)));
+    }
 }
 
 ?>

+ 71 - 0
protected/class/shareact.php

@@ -0,0 +1,71 @@
+<?php
+
+Doo::loadModel('share');
+Doo::loadClass('Hashids/Hashids');
+
+/**
+ * Description of Users
+ *
+ * @author zongheng
+ */
+class Shareact
+{
+
+    private $__share, $__hashids, $__timetmp;
+
+    function __construct()
+    {
+        $this->__share = new Share();
+        $this->__hashids = new Hashids\Hashids('zhhashsalt');
+    }
+
+    public function insertHashcode($ids, $idtype)
+    {
+        $this->__timetmp = gettimeofday();
+        $this->__share->endtime = time();
+        $this->__share->intime = time();
+        $this->__share->hashcode = $this->__hashids->encode($this->__timetmp['sec']);
+        $this->__share->ids = $ids;
+        $this->__share->idtype = $idtype;
+        return array('status' => $this->__share->insert(), 'hashcode' => $this->__share->hashcode);
+    }
+
+    public function updateHashcode($ids, $idtype)
+    {
+        $this->__timetmp = gettimeofday();
+        $this->__share->hashcode = $this->__hashids->encode($this->__timetmp['sec']);
+        return array('status' => $this->__share->update(array('where' => 'ids=? AND idtype=?', 'param' => array($ids, $idtype))), 'hashcode' => $this->__share->hashcode);
+    }
+
+    public function deleteHashcode($ids,$idtype)
+    {
+        $hashcode = $this->getHashCode($ids,$idtype);
+        return $this->__share->delete(array('where' => 'sid=?', 'param' => array($hashcode['sid'])));
+    }
+
+    public function getCount($ids, $idtype)
+    {
+        return $this->__share->Count(array('where' => 'ids=? AND idtype=?', 'param' => array($ids, $idtype)));
+    }
+
+    public function getHashCode($ids,$idtype)
+    {
+        return $this->__share->getOne(array('where' => 'ids=? AND idtype=?', 'param' => array($ids, $idtype), 'asArray' => true));
+    }
+
+    public function getSectionCount($ids)
+    {
+        return $this->__share->getOne(array('where' => 'ids=? AND idtype=2', 'param' => array($ids), 'asArray' => true));
+    }
+
+    public function getCountByKey($key)
+    {
+        return $this->__share->Count(array('where' => 'hashcode=?', 'param' => array($key)));
+    }
+
+    public function getOne($key)
+    {
+        return $this->__share->getOne(array('where' => 'hashcode=?', 'param' => array($key), 'asArray' => true));
+    }
+
+}

+ 27 - 0
protected/config/routes.conf.php

@@ -211,6 +211,10 @@ $route['*']['/manage/item/del/:pmid'] = array('[admin]ItemController', 'itemDel'
 $route['*']['/manage/restore/list'] = array('[admin]RestoreController', 'restoreList');
 $route['*']['/manage/sys/info'] = array('[admin]SysController', 'sysinfo');
 $route['*']['/manage/sys/sms/switch'] = array('[admin]SysController', 'smsSwitch');
+
+$route['*']['/manage/item/index'] = array('[admin]ProController', 'index');
+$route['*']['/manage/item/:pid/section'] = array('[admin]ProController', 'section');
+$route['*']['/manage/item/:pmid/period'] = array('[admin]ProController', 'period');
 // upgrade
 $route['*']['/api/upgrade/v1/get/web/version'] = array('UpgradeController', 'getWebVersion');
 $route['*']['/api/upgrade/v1/get/software/version'] = array('UpgradeController', 'getSoftwareVersion');
@@ -219,4 +223,27 @@ $route['*']['/api/upgrade/v1/set/switch/:onoff'] = array('UpgradeController', 's
 $route['*']['/api/upgrade/v1/set/upgrade/info'] = array('UpgradeController', 'setUpgradeInfo');
 $route['*']['/api/upgrade/v1/get/version/status'] = array('UpgradeController', 'getVersionAndStatus');
 
+
+// App api
+$route['*']['/api/app/serverlogin'] = array('AppController', 'ServerLogin');
+$route['*']['/api/app/signin'] = array('AppController', 'AppSignin');
+$route['*']['/api/app/unsectionlist'] = array('AppController', 'UnSectionList');
+$route['*']['/api/app/itemlist'] = array('AppController', 'ItemCkeckedList');
+$route['*']['/api/app/sectionlist/:pid'] = array('AppController', 'SectionCheckedList');
+$route['*']['/app/rproject/:pid/section/:pmid/detail'] = array('AppController', 'proDetail');
+
+//share
+$route['*']['/share/project/:hashcode'] = array('ShareController', 'project');
+$route['*']['/share/project/tender/:tenderid/:hashcode'] = array('ShareController', 'proTender');
+$route['*']['/share/section/:hashcode'] = array('ShareController', 'section');
+$route['*']['/share/section/tender/:tenderid/:hashcode'] = array('ShareController', 'secTender');
+$route['*']['/share/tender/:hashcode'] = array('ShareController', 'tender');
+$route['*']['/share/get/project'] = array('ShareController', 'ajaxGetProject');
+$route['*']['/share/get/section'] = array('ShareController', 'ajaxGetSection');
+$route['*']['/share/get/tender'] = array('ShareController', 'ajaxGetTender');
+$route['*']['/share/get'] = array('ShareController', 'getShare');
+$route['*']['/share/set'] = array('ShareController', 'setShare');
+
+$route['*']['/share/error'] = array('ShareController', 'error');
+
 ?>

+ 589 - 0
protected/controller/AppController.php

@@ -0,0 +1,589 @@
+<?php
+
+Doo::loadCore('auth/DooAuth');
+Doo::loadClass('PasswordHash');
+Doo::loadClass('client');
+Doo::loadClass('auth');
+Doo::loadClass('attachment');
+Doo::loadClass('attfile');
+Doo::loadClass('actmeasure');
+Doo::loadClass('contractact');
+Doo::loadClass('project');
+Doo::loadClass('profile');
+Doo::loadClass('numofperact');
+Doo::loadClass('measureauditact');
+Doo::loadClass('itemfile');
+Doo::loadModel('users');
+Doo::loadClass('itemmeasurenum');
+Doo::loadModelAt('aconfig', 'admin');
+Doo::loadClass('sms');
+
+/**
+ * MainController
+ * Feel free to delete the methods and replace them with your own code.
+ *
+ * @author EllisRan
+ */
+class AppController extends DooController {
+
+    private $data, $client, $auth, $att, $file, $zip, $actmeasure, $contractact, $project, $profile, $numofperact, $measureauditact, $attfile, $users, $itemfile, $modelconfig, $aconfig, $sms, $itemMeasureNum;
+
+    private $statusArray = array('uncheck' => '1', 'checking' => '2', 'checked' => '3', 'checkno' => '4');
+    private $fileTypeArray = array('台帐附件');
+
+    public function __construct()
+    {
+        $this->data['rootUrl'] = Doo::conf()->APP_URL;
+        $this->client = new client();
+        $this->auth = new Auth();
+        $this->att = new attachment();
+        $this->attfile = new attFile();
+//        $this->zip = new ZipArchive();
+        $this->actmeasure = new actMeasure();
+        $this->contractact = new Contractact();
+        $this->project = new Project();
+        $this->profile = new Profile();
+        $this->numofperact = new NumofperAct();
+        $this->measureauditact = new MeasureauditAct();
+        $this->users = new Users();
+        $this->itemfile = new ItemFile();
+        $this->modelconfig = new AConfig();
+        $this->itemMeasureNum = new ItemMeasureNumpofper();
+        $this->aconfig = new AConfig();
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
+    }
+
+    public function ServerLogin() {
+        if(isset($_POST['sname']) && !empty($_POST['sname'])){
+            $allserver = array($_SERVER['HTTP_HOST']);
+            if(in_array(trim($_POST['sname']), $allserver)){
+                echo json_encode(array('status' => TRUE, 'msg' => ''), JSON_UNESCAPED_UNICODE);
+                die;
+            }else{
+                echo json_encode(array('status' => FALSE, 'msg' => '服务器不存在。'), JSON_UNESCAPED_UNICODE);
+                die;
+            }
+        }else{
+            echo json_encode(array('status' => FALSE, 'msg' => '请输入服务器名称。'), JSON_UNESCAPED_UNICODE);
+            die;
+        }
+    }
+
+    public function AppSignin() {
+        if(!isset($_POST['username']) || empty($_POST['username'])){
+            echo json_encode(array('status' => FALSE, 'msg' => '请输入邮箱'), JSON_UNESCAPED_UNICODE);
+            die;
+        }
+        if(!isset($_POST['userpwd']) || empty($_POST['userpwd'])){
+            echo json_encode(array('status' => FALSE, 'msg' => '请输入密码'), JSON_UNESCAPED_UNICODE);
+            die;
+        }
+
+        if ($this->auth->login($_POST['username'], $_POST['userpwd'])) {
+            $uinfo = $this->auth->getUinfo();
+            if (isset($uinfo['isstop']) && $uinfo['isstop'] > 0) {
+                echo json_encode(array('status' => FALSE, 'msg' => '邮箱不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
+                die;
+            }
+            if (isset($uinfo['uid'])) {
+                $userArray = $this->profile->getProWithUid($uinfo['uid']);
+                $avatarStr = $userArray['avatar'];
+                if (isset($userArray['userid'])) {
+//                    $this->auth->setUid($uinfo['uid']);
+                    $msgArray = array('uid' => $uinfo['uid'], 'name' => $userArray['name'], 'email' => $uinfo['uemail'], 'ucompany' => $userArray['company'], 'jobtitle' => $userArray['jobs'], 'avatar' => Doo::conf()->APP_URL . $avatarStr);
+                    echo json_encode(array('status' => TRUE, 'msg' => '', 'userinfo' => $msgArray), JSON_UNESCAPED_UNICODE);
+                    die;
+                }
+            }
+
+        } else {
+            echo json_encode(array('status' => FALSE, 'msg' => '邮箱不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
+            die;
+        }
+    }
+
+    // 获取待审批标段名
+    public function UnSectionList(){
+        if(isset($_POST['uid']) && !empty($_POST['uid']) && is_numeric($_POST['uid'])){
+            $unsectionlist = $this->measureauditact->getCheckedRowbyUID6($_POST['uid']);
+            $unslist = array();
+            if(!empty($unsectionlist)){
+                foreach($unsectionlist as $k => $v){
+                    $unslist[$k]['pname'] = $this->project->getRowByPid($v['pid'])['pname'];
+                    $unslist[$k]['sectionlist'] = array();
+                    $sectionlist = $this->measureauditact->getCheckedRowbyUID7($_POST['uid'],$v['pid']);
+                    if(!empty($sectionlist)){
+                        foreach($sectionlist as $sk => $sv){
+                            $name = $this->actmeasure->getRowByPmid($sv['pmid']);
+                            $unslist[$k]['sectionlist'][$sk]['pmname'] = !empty($name) ? $name['pmname'] : '';
+                            $countNum = $this->numofperact->getLastNew2($sv['pmid'])['numpname'];
+                            $unslist[$k]['sectionlist'][$sk]['countNum'] = !empty($countNum) ? $countNum : 0;
+                            $unslist[$k]['sectionlist'][$sk]['audittime'] = !empty($sv['audittime']) ? date('Y-m-d',$sv['audittime']) : '';
+                            $unslist[$k]['sectionlist'][$sk]['url'] = '/app/rproject/' . $sv['pid'] . '/section/' . $sv['pmid'] . '/detail';
+                            $stname = $this->contractact->getRowByStid($sv['stid']);
+                            $unslist[$k]['sectionlist'][$sk]['stname'] = !empty($stname) ? $stname['stname'] : '';
+                        }
+                    }
+                }
+            }
+            echo json_encode(array('status' => TRUE, 'msg' => '', 'unsectionlist' => $unslist), JSON_UNESCAPED_UNICODE);
+            die();
+        }else{
+            $status = array('status' => FALSE, 'msg' => '获取待审批标段列表出错');
+            echo json_encode($status, JSON_UNESCAPED_UNICODE);
+            die();
+        }
+    }
+
+    //获取已审核项目名
+    public function ItemCkeckedList(){
+        if(isset($_POST['uid']) && !empty($_POST['uid']) && is_numeric($_POST['uid'])){
+            $Itemlist = $this->measureauditact->getCheckedRowbyUID3($_POST['uid']);
+            $Itemcheckedlist = array();
+            if(!empty($Itemlist)){
+                foreach($Itemlist as $k => $v){
+                    $name = $this->project->getRowByPid($v['pid']);
+                    $Itemcheckedlist[$k]['pid'] = $v['pid'];
+                    $Itemcheckedlist[$k]['pname'] = $name['pname'];
+                }
+            }
+            echo json_encode(array('status' => TRUE, 'msg' => '', 'Itemlist' => $Itemcheckedlist), JSON_UNESCAPED_UNICODE);
+            die();
+        }else{
+            $status = array('status' => FALSE, 'msg' => '获取已审核项目列表出错');
+            echo json_encode($status, JSON_UNESCAPED_UNICODE);
+            die();
+        }
+    }
+
+    //获取已审核项目中已审核标段的信息
+    public function SectionCheckedList(){
+        if(isset($_POST['uid']) && is_numeric($_POST['uid']) && isset($this->params['pid']) && is_numeric($this->params['pid'])){
+            //先获取标段类型列表
+            $stlist = $this->measureauditact->getCheckedRowbyUID4($_POST['uid'], $this->params['pid']);
+            $sectioncheckedlist = array();
+            if(!empty($stlist)){
+                $i = 0;
+                foreach($stlist as $k => $v){
+                    //再获取标段名信息
+                    $sectionlist = $this->measureauditact->getCheckedRowbyUID5($_POST['uid'], $this->params['pid'],$v['stid']);
+                    $sectioncheckedlistarray = array();
+                    if(!empty($sectionlist)){
+                        $j = 0;
+                        foreach($sectionlist as $key => $value){
+                            $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $value['pmid']);
+                            if (!isset($numStatusArray['currstatus'])) {
+                                $numStatusArray['currstatus'] = 'uncheck';
+                            }
+                            $datatmp = $this->measureauditact->getMyAuditStatus2($numStatusArray['pmid'], $numStatusArray['numpname'], $numStatusArray['times'], $_POST['uid']);
+                            if ($datatmp && ($datatmp['mastatus'] == 'checked' || $datatmp['mastatus'] == 'checkno') ) {
+                                $pmname = $this->actmeasure->getRowByPmid($value['pmid']);
+                                $sectioncheckedlistarray[$j]['pmname'] =  !empty($pmname) ? $pmname['pmname'] : '';
+                                $sectioncheckedlistarray[$j]['countNum'] = !empty($datatmp['numpname']) ? $datatmp['numpname'] : 0;
+                                $sectioncheckedlistarray[$j]['audittime'] = !empty($datatmp['audittime']) ? date('Y-m-d',$datatmp['audittime']) : '';
+                                $sectioncheckedlistarray[$j]['url'] = '/app/rproject/' . $this->params['pid'] . '/section/' . $value['pmid'] . '/detail';
+                                $j++;
+                            }
+                        }
+                    }
+                    if(!empty($sectioncheckedlistarray)){
+                        $stname = $this->contractact->getRowByStid($v['stid']);
+                        $sectioncheckedlist[$i]['stname'] = !empty($stname['stname']) ? $stname['stname'] : '';
+                        $sectioncheckedlist[$i]['stlist'] = $sectioncheckedlistarray;
+                    }
+                    $i++;
+                }
+            }
+            echo json_encode(array('status' => TRUE, 'msg' => '', 'sectionlist' => $sectioncheckedlist), JSON_UNESCAPED_UNICODE);
+            die();
+        }else{
+            $status = array('status' => FALSE, 'msg' => '获取已审核标段列表出错');
+            echo json_encode($status, JSON_UNESCAPED_UNICODE);
+            die();
+        }
+    }
+
+    //内嵌app页
+    public function proDetail() {
+        if(isset($_GET['uid']) && is_numeric($_GET['uid'])) {
+            if(isset($_GET['approval'])){
+                $this->data['approval'] = 1;
+            }
+            $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
+            if (!isset($numStatusArray['currstatus'])) {
+                $numStatusArray['currstatus'] = 'uncheck';
+            }
+            // 项目名称
+            $mpidArray = $this->measureauditact->getAuditProject2($_GET['uid']);
+            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']);
+            $this->data['MeasureArray3'] = array_reverse($this->data['MeasureArray']);
+            $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);
+                } else {
+                    $this->data['MeasureArray'][$key]['lessTotal'] = 0;
+                }
+            }
+
+            // 期数列表
+            $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'] == $numStatusArray['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'] == $numStatusArray['mpid']) {
+                    $this->data['MeasureArray2'][$key]['currstatus'] = $this->statusArray[$value['currstatus']];
+                    if ($measureArray['contracttotal'] > $value['currdone'] && $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($numStatusArray['mpid']);
+            $auditUserArray = $this->measureauditact->getRowByMpidTimes($numStatusArray['mpid'], $maxtimez['times']);
+            $auditArray = $this->measureauditact->getLastNewRowInfo($lastRowArray['pmid'], $lastRowArray['numpname'], $_GET['uid']);
+            if (isset($_POST['act'])) {
+                $auditStatusArray = array('checkno', 'checked');
+                $myAuditStatus = $this->measureauditact->getMyAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $_GET['uid']);
+                if (in_array($myAuditStatus['mastatus'], $auditStatusArray)) {
+                    echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+                    die();
+                }
+            }
+            if ($_POST['act'] == 'p') {
+                if ($this->measureauditact->setMyAuditPass($auditArray['maid'], $_POST['content'], 1, $_GET['uid'])) {
+                    $countAudit = count($auditUserArray);
+                    $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+                    if ($auditArray['last'] == 1) {
+                        $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checked', $maxTimes['times']);
+                        // SMS Start
+                        $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
+                        $userProArray = $this->profile->getProWithUid($TenderArray['uid']);
+                        if (isset($userProArray) && ($userProArray['mobile'])) {
+                            $retval = $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR3"]);
+                        }
+                        // SMS End
+                        echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+                        die();
+                    } else {
+                        if (($countAudit == 2) && ($auditUserArray[1]['last'] == 1) && ($auditUserArray[0]['maid'] == $auditArray['maid'])) {
+                            $this->measureauditact->updateMastatus($auditUserArray[1]['maid']);
+                            $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
+                            // SMS Start
+                            $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[1]['auditoruid']);
+                            $pmnameArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
+                            if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// XXXX(标段名),陈特,已审批通过。请您继续审批。
+                                $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+                            }
+                            // SMS End
+                            echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+                            die();
+                        }
+                        if (($countAudit > 2)) {
+                            foreach ($auditUserArray as $k => $v) {
+                                if ($v['maid'] == $auditArray['maid']) {
+                                    if ($k == ($countAudit - 1)) {//如果是最后一个
+                                        $this->measureauditact->updateMastatus($auditUserArray[0]['maid']);
+                                        // SMS Start
+                                        $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[0]['auditoruid']);
+                                        // var_dump($verifyUserArray);
+                                        $pmnameArray = $this->actmeasure->getRowByPmid($auditUserArray[0]['pmid']);
+                                        // var_dump($pmnameArray);
+                                        // SMS End
+                                    } else {
+                                        $this->measureauditact->updateMastatus($auditUserArray[$k + 1]['maid']);
+                                        // SMS Start
+                                        $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[$k + 1]['auditoruid']);
+                                        // var_dump($verifyUserArray);
+                                        $pmnameArray = $this->actmeasure->getRowByPmid($auditUserArray[$k + 1]['pmid']);
+                                        // var_dump($pmnameArray);
+                                        // SMS End
+                                    }
+                                    // SMS Start
+                                    if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// XXXX(标段名),陈特,已审批通过。请您继续审批。
+//                                    $retval = $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+                                        $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+//                                        var_dump($pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+//                                        var_dump($retval);
+//                                        var_dump($this->sms->getErrors());
+                                    }
+                                    // SMS End
+                                    $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
+                                    echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+                                    die();
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            if ($_POST['act'] == 'np') {
+                $this->measureauditact->setCheckno($auditArray['maid'], $_POST['content'], 1);
+                $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $maxTimes['times']);
+                $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+                // SMS Start
+                $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
+                $userProArray = $this->profile->getProWithUid($TenderArray['uid']);
+                if (isset($userProArray) && ($userProArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
+                    $retval = $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR4"]);
+//                var_dump($retval);
+//                var_dump($this->sms->getErrors());
+//                $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR4"]);
+                }
+                // SMS End
+                echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+                die();
+            }
+            $this->data['pmid'] = $lastRowArray['pmid'];
+            $this->data['numpname'] = $lastRowArray['numpname'];
+            $this->data['times'] = $lastRowArray['times'];
+            foreach ($auditUserArray as $key => $value) {
+                $strAvatar = $this->auth->getAvatar($value['auditoruid']);
+                if ($value['auditoruid'] == $_GET['uid']) {
+                    $this->data['mastatus'] = $value['mastatus'];
+                    $this->data['maid'] = $value['maid'];
+                    $name = $this->profile->getProWithUid($value['auditoruid'])['name'].'(我)';
+                }else{
+                    $name = $this->profile->getProWithUid($value['auditoruid'])['name'];
+                }
+                if ($value['mastatus'] == 'uncheck') {
+                    $statushtml = '<div class="approvalImg"><img class="pa2ss" src="'. $strAvatar .'">'.$name.'<b class="colGray fR">待审</b></div>';
+                }
+                if ($value['mastatus'] == 'checking') {
+                    $statushtml = '<div class="approvalImg"><img class="wait" src="'. $strAvatar .'">'.$name.'<b class="colOrange fR">审批中</b></div>';
+                }
+                if ($value['mastatus'] == 'checked') {
+                    $statushtml = '<div class="approvalImg"><img class="pass" src="'. $strAvatar .'">'.$name.'<b class="colGreen fR">审批完成(' . date('Y-m-d', $value['audittime']) . ')</b></div>';
+                }
+                if ($value['mastatus'] == 'checkno') {
+                    $statushtml = '<div class="approvalImg"><img class="unpass" src="'. $strAvatar .'">'.$name.'<b class="colRed fR">审批不通过(' . date('Y-m-d', $value['audittime']) . ')</b></div>';
+                }
+                $auditUserArray[$key]['statushtml'] = $statushtml;
+            }
+            $strAvatar = $this->auth->getAvatar($measureArray['uid']);
+            $orginArrayname = $this->profile->getProWithUid($measureArray['uid'])['name'];
+            $attfileArray = $this->attfile->getFirstFile($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['times']);
+            $orginArray['time'] = date('Y-m-d', $attfileArray['intime']);
+            $orginArray['statushtml'] = '<div class="approvalImg"><img class="pass" src="'. $strAvatar .'">'.$orginArrayname.'<b class="colGreen fR">原报上报(' . $orginArray['time'] . ')</b></div>';
+            $this->data['auditArray'] = $auditUserArray;
+            $this->data['orginArray'] = $orginArray;
+
+            $this->data['uid'] = $_GET['uid'];
+            $this->data['pmid'] = $this->params['pmid'];
+            $this->data['pid'] = $this->params['pid'];
+            $this->data['mpid'] = $numStatusArray['mpid'];
+            $this->render('r-project-section-detail-APP', $this->data, TRUE);
+        }else{
+            exit('error:无参数无法访问本页');
+        }
+    }
+
+//二维数组去掉重复值 并保留键值
+    function array_unique_fb($array2D)
+    {
+        $key = array();
+        foreach ($array2D as $k => $v) {
+            if (empty($key))
+                $key = array_keys($v); //记录数组的KEY
+            $v = join(",", $v); //降维,也可以用implode,将一维数组转换为用逗号连接的字符串
+            $temp[$k] = $v;
+        }
+        $temp = array_unique($temp); //去掉重复的字符串,也就是重复的一维数组
+        foreach ($temp as $k => $v) {
+            $array = explode(",", $v); //再将拆开的数组重新组装
+            foreach ($array as $i => $t) {
+                $temp2[$k] = !empty($temp2[$k]) ? array_merge($temp2[$k], array("{
+        $key[$i]}" => $t)) : array("{
+        $key[$i]}" => $t); //依次添加到新的数组中去
+            }
+        }
+        return $temp2;
+    }
+
+    function unique_arr($array2D, $stkeep = false, $ndformat = true)
+    {
+        // 判断是否保留一级数组键 (一级数组键可以为非数字)
+        if ($stkeep)
+            $stArr = array_keys($array2D);
+        // 判断是否保留二级数组键 (所有二级数组键必须相同)
+        if ($ndformat)
+            $ndArr = array_keys(end($array2D));
+        //降维,也可以用implode,将一维数组转换为用逗号连接的字符串
+        foreach ($array2D as $v) {
+            $v = join(",", $v);
+            $temp[] = $v;
+        }
+        //去掉重复的字符串,也就是重复的一维数组
+        $temp = array_unique($temp);
+        //再将拆开的数组重新组装
+        foreach ($temp as $k => $v) {
+            if ($stkeep)
+                $k = $stArr[$k];
+            if ($ndformat) {
+                $tempArr = explode(",", $v);
+                foreach ($tempArr as $ndkey => $ndval) {
+                    $output[$k][$ndArr[$ndkey]] = $ndval;
+                }
+            } else {
+                $output[$k] = explode(",", $v);
+            }
+        }
+        return $output;
+    }
+
+
+    /**
+     *   。
+     *   标段ID,期号
+     */
+    private function __auditNotice($mobile, $text)
+    {
+        $smsSwitch = $this->aconfig->getOne(array('select' => 'smsSwitch', 'asArray' => TRUE))['smsSwitch'];
+        if ($smsSwitch > 0)
+            return $this->sms->sendSms($mobile, $text);
+
+    }
+
+    function upfile($fildname, $param = 'doc, docx, xls, xlsx, png, zip')
+    {
+        return $this->att->uploadMut($fildname, $param);
+    }
+
+    function upItemFile($fildname, $param = 'doc, docx, xls, xlsx, png, zip')
+    {
+        $this->att->setUploadDir();
+        return $this->att->uploadMut($fildname, $param);
+    }
+
+    /**
+     *   根据标段ID获取标段是否已经被删除的提示
+     *   标段ID
+     */
+    public function getCountPmid()
+    {
+        if (isset($this->params['tenderid'])) {
+            $isexist = $this->actmeasure->getCountPmid($this->params['tenderid']);
+            if ($isexist > 0) {
+                echo json_encode(array('status' => TRUE, 'msg' => '', 'info' => null), JSON_UNESCAPED_UNICODE);
+                die();
+            } else {
+                echo json_encode(array('status' => 'FALSE', 'msg' => '该项目[XXX]在云端已被删除,点击“确定”后,可手动删除该项目'), JSON_UNESCAPED_UNICODE);
+                die();
+            }
+        } else {
+            $this->msg(0, '获取标段是否存在参数错误');
+        }
+    }
+
+    function getFileupErrorNo()
+    {
+        return $this->att->error();
+    }
+
+    function Signout()
+    {
+        session_destroy();
+    }
+
+    function isLoggedIn()
+    {
+        return isset($_SESSION['user_id']);
+    }
+
+    function generateFormHash($salt)
+    {
+        $hash = md5(mt_rand(1, 1000000) . $salt);
+        $_SESSION['csrf_hash'] = $hash;
+        return $hash;
+    }
+
+    function isValidFormHash($hash)
+    {
+        return $_SESSION['csrf_hash'] === $hash;
+    }
+
+    /**
+     * 随机字符串函数
+     * @param $password 密码
+     * @param $random 随机数
+     */
+    function random($length, $chars = '0123456789')
+    {
+        $hash = '';
+        $max = strlen($chars) - 1;
+        for ($i = 0; $i < $length; $i++) {
+            $hash .= $chars[mt_rand(0, $max)];
+        }
+        return $hash;
+    }
+
+    /**
+     * 生成随机字符串
+     * @param string $lenth 长度
+     * @return string 字符串
+     */
+    function create_randomstr($lenth = 6)
+    {
+        return $this->random($lenth, '123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ');
+    }
+
+    function dir_create($path, $mode = 0777)
+    {
+        if (is_dir($path))
+            return TRUE;
+        $path = $this->dir_path($path);
+        $parent = dirname($path);
+        if (!is_dir($parent))
+            @mkdir($parent, 0777, true);
+        @mkdir($path, 0777, true);
+        return is_dir($path);
+    }
+
+    function dir_path($path)
+    {
+        $path = str_replace('\\', '/', $path);
+        if (substr($path, -1) != '/')
+            $path = $path . '/';
+        return $path;
+    }
+
+    function msg($isTrue = 0, $msg = null, $retmsg = null)
+    {
+        if ($isTrue > 0) {
+            echo json_encode(array('status' => 'TRUE', 'msg' => ''), JSON_UNESCAPED_UNICODE);
+            die();
+        } else {
+            echo json_encode(array('status' => 'FALSE', 'msg' => $msg), JSON_UNESCAPED_UNICODE);
+            die();
+        }
+    }
+
+//    function checkVersion($version)
+//    {
+//        preg_match();
+//    }
+
+}
+
+?>

+ 23 - 49
protected/controller/ClientController.php

@@ -1,4 +1,5 @@
 <?php
+
 Doo::loadCore('auth/DooAuth');
 Doo::loadClass('PasswordHash');
 Doo::loadClass('client');
@@ -67,7 +68,7 @@ class ClientController extends DooController
             echo json_encode(array('status' => FALSE, 'msg' => '登录失败,请更新软件。'), JSON_UNESCAPED_UNICODE);
             die;
         }
-        if (!empty($_POST['version'])) {
+        if (isset($_POST['v4name']) && isset($_POST['v4pass']) && !empty($_POST['version'])) {
             try {
                 if ($this->modelconfig->getOne(array('select' => 'onoff', 'asArray' => TRUE))['onoff'] != 1) {
                     $versionTotal = array_sum(explode('.', $_POST['version']));
@@ -89,47 +90,25 @@ class ClientController extends DooController
                             }
                         }
                     }
-                    if ($_POST['logintype'] == 2) {
-                        if ($this->auth->loginWithUserName($_POST['v4name'])) {
-                            $uinfo = $this->auth->getUinfo();
-                            if (isset($uinfo['isstop']) && $uinfo['isstop'] > 0) {
-                                echo json_encode(array('status' => FALSE, 'msg' => '帐号不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
-                                die;
-                            }
-                            if (isset($uinfo['uid'])) {
-                                $userArray = $this->profile->getProWithUid($uinfo['uid']);
-                                $avatarStr = $userArray['avatar'];
-                                if (isset($userArray['userid'])) {
-                                    $msgArray = array('uid' => $uinfo['uid'], 'name' => $userArray['name'], 'email' => $uinfo['uemail'], 'ucompany' => $userArray['company'], 'jobtitle' => $userArray['jobs'], 'avatar' => Doo::conf()->APP_URL . $avatarStr);
-                                    echo json_encode(array('status' => TRUE, 'msg' => '', 'userinfo' => $msgArray), JSON_UNESCAPED_UNICODE);
-                                    die;
-                                }
-                            }
-                        } else {
-                            echo json_encode(array('status' => FALSE, 'msg' => '帐号不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
+                    if ($this->auth->login($_POST['v4name'], $_POST['v4pass'])) {
+                        $uinfo = $this->auth->getUinfo();
+                        if (isset($uinfo['isstop']) && $uinfo['isstop'] > 0) {
+                            echo json_encode(array('status' => 'false', 'msg' => '帐号不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
                             die;
                         }
-                    } else {
-                        if ($this->auth->login($_POST['v4name'], $_POST['v4pass'])) {
-                            $uinfo = $this->auth->getUinfo();
-                            if (isset($uinfo['isstop']) && $uinfo['isstop'] > 0) {
-                                echo json_encode(array('status' => 'false', 'msg' => '帐号不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
+                        if (isset($uinfo['uid'])) {
+                            $userArray = $this->profile->getProWithUid($uinfo['uid']);
+                            $avatarStr = $userArray['avatar'];
+                            if (isset($userArray['userid'])) {
+                                $msgArray = array('uid' => $uinfo['uid'], 'name' => $userArray['name'], 'email' => $uinfo['uemail'], 'ucompany' => $userArray['company'], 'jobtitle' => $userArray['jobs'], 'avatar' => Doo::conf()->APP_URL . $avatarStr);
+                                echo json_encode(array('status' => 'true', 'msg' => '', 'userinfo' => $msgArray), JSON_UNESCAPED_UNICODE);
                                 die;
                             }
-                            if (isset($uinfo['uid'])) {
-                                $userArray = $this->profile->getProWithUid($uinfo['uid']);
-                                $avatarStr = $userArray['avatar'];
-                                if (isset($userArray['userid'])) {
-                                    $msgArray = array('uid' => $uinfo['uid'], 'name' => $userArray['name'], 'email' => $uinfo['uemail'], 'ucompany' => $userArray['company'], 'jobtitle' => $userArray['jobs'], 'avatar' => Doo::conf()->APP_URL . $avatarStr);
-                                    echo json_encode(array('status' => 'true', 'msg' => '', 'userinfo' => $msgArray), JSON_UNESCAPED_UNICODE);
-                                    die;
-                                }
-                            }
-
-                        } else {
-                            echo json_encode(array('status' => 'false', 'msg' => '帐号不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
-                            die;
                         }
+
+                    } else {
+                        echo json_encode(array('status' => 'false', 'msg' => '帐号不存在或者密码错误'), JSON_UNESCAPED_UNICODE);
+                        die;
                     }
                 } else {
                     echo json_encode(array('status' => 'false', 'msg' => '该计量支付已关闭,请联系相关管理人员。'), JSON_UNESCAPED_UNICODE);
@@ -245,7 +224,7 @@ class ClientController extends DooController
                     }
                 }
                 if ($mpid > 0) {
-                    if ($this->attfile->insertFile($pmArray['pid'], $pmArray['stid'], $mpid, $this->params['tenderid'], $this->params['phaseno'], $this->params['userid'], $fp[0]['filepath'], 0, $_POST['MD5_JL'], $iniTimes)) {
+                    if ($this->attfile->insertFile($pmArray['pid'], $pmArray['stid'], $mpid, $this->params['tenderid'], $this->params['phaseno'], $this->params['userid'], $fp[0]['filepath'], 0, $_POST['MD5_JL'], $iniTimes, 2)) {
                         $infostatus = 0;
                         $pmArray = $this->numofperact->getRowTender($this->params['tenderid']);
                         if ($pmArray) {
@@ -321,6 +300,7 @@ class ClientController extends DooController
             if (isset($auditArray[0]['auditoruid'])) {
                 foreach ($auditArray as $key => $value) {
                     $userArray = $this->profile->getProWithUid($value['auditoruid']);
+                    $auditcontent = !empty($value['auditcontent']) ? $value['auditcontent'] : '';
 //		    $finalStatus = $value['mastatus'];
                     if ($value['mastatus'] != 'uncheck') {
                         $isUnCheck = FALSE;
@@ -328,10 +308,7 @@ class ClientController extends DooController
                     if ($value['audittime'] > 0) {
                         $value['audittime'] = date('Y-m-d', $value['audittime']);
                     }
-                    if(!isset($value['auditcontent'])){
-                      $value['auditcontent'] = '';
-                    }
-                    $auditInfo[] = array('uid' => $userArray['userid'], 'name' => $userArray['name'], 'company' => $userArray['company'], 'jobs' => $userArray['jobs'], 'avatar' => $this->auth->getAvatar($value['auditoruid']), 'mastatus' => $this->statusArray[$value['mastatus']], 'CheckerMemo' => $value['auditcontent'], 'onlineaudit' => $value['onlineaudit'], 'audittime' => $value['audittime']);
+                    $auditInfo[] = array('uid' => $userArray['userid'], 'name' => $userArray['name'], 'company' => $userArray['company'], 'jobs' => $userArray['jobs'], 'avatar' => $this->auth->getAvatar($value['auditoruid']), 'mastatus' => $this->statusArray[$value['mastatus']], 'CheckerMemo' => $auditcontent, 'onlineaudit' => $value['onlineaudit'], 'audittime' => $value['audittime']);
                 }
             }
             if ($ownerStatusArray) {
@@ -353,7 +330,7 @@ class ClientController extends DooController
 
     public function getUserSearch()
     {
-        if (isset($_POST['uemail']) && filter_var($_POST['uemail'], FILTER_VALIDATE_EMAIL)) {
+        if (isset($_POST['uemail'])) {
             $retval = $this->users->getOne(array('where' => 'uemail=?', 'param' => array($_POST['uemail']), 'asArray' => TRUE));
             if (isset($retval['uid'])) {
                 $proArray = $this->profile->getProWithUid($retval['uid']);
@@ -413,11 +390,7 @@ class ClientController extends DooController
                     $uinfoArray[$key]['mastatus'] = $this->statusArray[$value['mastatus']];
                     $uinfoArray[$key]['uid'] = $value['auditoruid'];
                     $uinfoArray[$key]['avatar'] = $this->auth->getAvatar($value['auditoruid']);
-                    if(isset($value['auditcontent'])){
-                      $uinfoArray[$key]['CheckerMemo'] = $value['auditcontent'];
-                    }else {
-                      $uinfoArray[$key]['CheckerMemo'] = '';
-                    }
+                    $uinfoArray[$key]['CheckerMemo'] = !empty($value['auditcontent']) ? $value['auditcontent'] : '';
                     $uinfoArray[$key]['onlineaudit'] = $value['onlineaudit'];
                     if ($value['audittime'] > 0) {
                         $uinfoArray[$key]['audittime'] = date('Y-m-d', $value['audittime']);
@@ -1333,7 +1306,8 @@ class ClientController extends DooController
             if (iterator_count($iterator) > 0) {
                 foreach ($retval as $value) {
                     $proArray = $this->profile->getProWithUid($value['auditoruid']);
-                    $uArray[] = array('realname' => $proArray['name'], 'jobs' => $proArray['jobs'], 'acontent' => $value['auditcontent']);
+                    $auditcontent = !empty($value['auditcontent']) ? $value['auditcontent'] : '';
+                    $uArray[] = array('realname' => $proArray['name'], 'jobs' => $proArray['jobs'], 'acontent' => $auditcontent);
                 }
                 echo json_encode(array('status' => TRUE, 'msg' => '', 'info' => $uArray), JSON_UNESCAPED_UNICODE);
                 die();

+ 33 - 18
protected/controller/ProjectController.php

@@ -204,35 +204,50 @@ class ProjectController extends DooController
                 $this->data['conArray'][$k]['pstopnow'] = round(($this->data['conArray'][$k]['stopnow'] / $this->data['conArray'][$k]['total']) * 100);
                 $this->data['conArray'][$k]['pscurrdone'] = round(($this->data['conArray'][$k]['currdone'] / $this->data['conArray'][$k]['total']) * 100);
             }
-            // 分组出年月 每个月份的独立相加
-            $month = $this->numofperact->getStopNowStMonth($v['stid']);
+            // 分组出年月 每个月份的独立相加  累计完成总量
+            $month = $this->numofperact->getCurrTotalStMonthNoCheckno($v['stid']);
             foreach ($month as $key => $value) {
                 $allmonth[] = $value;
                 if (!in_array($value['month'], $monthArray))
-                    $monthArray = $value['month'];
+                    $monthArray[] = $value['month'];
             }
 
-            // 分组出年月 每个月份的独立相加
-            $month1 = $this->numofperact->getCurrDoneSMontht($v['stid']);
+            // 分组出年月 每个月份的独立相加   本月完成总量
+            $month1 = $this->numofperact->getCurrDoneStMonthNoCheckno($v['stid']);
             foreach ($month1 as $key => $value) {
                 $allmonth1[] = $value;
             }
         }
         // 中文表述年月
+        $total = $total1 = array();
+        $startyear = $cnymArray = array();
         foreach ($monthArray as $kk => $vv) {
-            foreach ($allmonth as $keyk => $valuev) {
-                if ($valuev['month'] == $vv)
-                    $total[$kk] += $valuev['sntotal'];
-            }
-            foreach ($allmonth1 as $k1 => $v1) {
-                if ($v1['month'] == $vv)
-                    $total1[$kk] += $v1['currdone'];
-            }
-            $ymarray = split('-', $vv);
-            $cnym = '\'' . $ymarray[1] . '月' . '\'';
-            if ($kk == 0)
-                $cnym = '\'' . $ymarray[0] . '年' . $ymarray[1] . '月' . '\'';
-            $cnymArray[] = $cnym;
+            $ymarray = explode('-', $vv);
+            if (!in_array($ymarray[0], $startyear))
+                $startyear[] = $ymarray[0];
+//            $cnym = '\'' . $ymarray[1] . '月' . '\'';
+//            if ($kk == 0)
+//                $cnym = '\'' . $ymarray[0] . '年' . $ymarray[1] . '月' . '\'';
+//            $cnymArray[] = $cnym;
+        }
+        $thismonth = 0;
+        foreach($startyear as $sk => $sv){
+            for($i = 1; $i <= 12; $i++){
+                $j = $i < 10 ? '0'.$i : $i;
+                $month = $sv.'-'.$j;
+                $thismonth1 = 0;
+                foreach ($allmonth as $keyk => $valuev) {
+                    if ($valuev['month'] == $month)
+                        $thismonth += $valuev['currtotal'];
+                }
+                $total[] = $thismonth != 0 ? $thismonth : 0;
+                foreach ($allmonth1 as $k1 => $v1) {
+                    if ($v1['month'] == $month)
+                        $thismonth1 += $v1['currdone'];
+                }
+                $total1[] = $thismonth1 != 0 ? $thismonth1 : 0;
+                $cnymArray[] = $i == 1 ? '\'' .$sv.'年'.$i.'月'. '\'' : '\'' .$i.'月'. '\'';
+            }
         }
         foreach ($total as $value2) {
             $total3[] = round(($value2 / $totalstid) * 100);

+ 10 - 8
protected/controller/RProjectController.php

@@ -29,7 +29,7 @@ class RProjectController extends DooController
     public function __construct()
     {
         $this->auth = new Auth();
-        $this->fileatt = new attFile();
+        $this->attfile = new attFile();
         $this->profile = new Profile();
         $this->project = new Project();
         $this->contractact = new Contractact();
@@ -598,7 +598,7 @@ class RProjectController extends DooController
         $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'] > 0)) {
+            if ($measureArray['contracttotal'] > $value['currdone'] && $value['currdone'] > 0) {
                 $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
             } else {
                 $this->data['MeasureArray'][$key]['lessTotal'] = 0;
@@ -614,7 +614,7 @@ class RProjectController extends DooController
     {
         // 面包屑导航
 
-        $fileatt = new attFile();
+
         // 期数列表
         $tmpArray = $this->numofperact->getGroupByLastOne2($this->params['pmid']);
         foreach ($tmpArray as $k => $v) {
@@ -646,10 +646,8 @@ class RProjectController extends DooController
         $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']);
-        $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'], $lastRowArray['numpname'],$maxTimes['times']);
+        $auditUserArray = $this->measureauditact->getRowByMpidTimes($this->params['mpid'], $maxtimez['times']);
         $auditArray = $this->measureauditact->getLastNewRowInfo($lastRowArray['pmid'], $lastRowArray['numpname'], $this->auth->getUid());
-        $attfileArray = $this->fileatt->getReportFile($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
-        $orginArray['time'] = date('Y-m-d', $attfileArray['intime']);
         if (isset($_POST['act'])) {
             $auditStatusArray = array('checkno', 'checked');
             $myAuditStatus = $this->measureauditact->getMyAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $this->auth->getUid());
@@ -661,7 +659,7 @@ class RProjectController extends DooController
         if ($_POST['act'] == 'p') {
             if ($this->measureauditact->setMyAuditPass($auditArray['maid'], $_POST['content'], 1, $this->auth->getUid())) {
                 $countAudit = count($auditUserArray);
-                $this->fileatt->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+                $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
                 if ($auditArray['last'] == 1) {
                     $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checked', $maxTimes['times']);
                     // SMS Start
@@ -728,7 +726,7 @@ class RProjectController extends DooController
         if ($_POST['act'] == 'np') {
             $this->measureauditact->setCheckno($auditArray['maid'], $_POST['content'], 1);
             $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $maxTimes['times']);
-            $this->fileatt->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+            $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
             // SMS Start
             $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
             $userProArray = $this->profile->getProWithUid($TenderArray['uid']);
@@ -782,6 +780,10 @@ class RProjectController extends DooController
         $strAvatar = $this->auth->getAvatar($measureArray['uid']);
         $orginArray['avatar'] = '<img src="' . $strAvatar . '"></li>';
         $orginArray['name'] = $this->profile->getProWithUid($measureArray['uid'])['name'];
+
+        $attfileArray = $this->attfile->getFirstFile($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['times']);
+
+        $orginArray['time'] = date('Y-m-d', $attfileArray['intime']);
         $this->data['auditArray'] = $auditUserArray;
         $this->data['orginArray'] = $orginArray;
         $this->data['pmid'] = $this->params['pmid'];

+ 80 - 25
protected/controller/SProjectController.php

@@ -118,36 +118,39 @@ class SProjectController extends DooController
         $this->data['allproArray'] = $this->project->getFewRow($pidstr);
         $this->data['currproArray'] = $this->project->getRowByPid($this->params['pid']);
         // 标段按月进度
-        for ($i = 1; $i <= 7; $i++) {
-            $monthz[] = date('n月', strtotime('+' . $i . ' months', $this->data['currproArray']['intime']));
-            if ($i == 1) {
-                $ii = date('Y年', $this->data['currproArray']['intime']) . date('n月', strtotime('+' . $i . ' months', $this->data['currproArray']['intime']));
-            } else {
-                $ii = date('n月', strtotime('+' . $i . ' months', $this->data['currproArray']['intime']));
-            }
-            $this->data['months'][$i]['month'] = $ii;
-        }
+//        for ($i = 1; $i <= 7; $i++) {
+//            $monthz[] = date('n月', strtotime('+' . $i . ' months', $this->data['currproArray']['intime']));
+//            if ($i == 1) {
+//                $ii = date('Y年', $this->data['currproArray']['intime']) . date('n月', strtotime('+' . $i . ' months', $this->data['currproArray']['intime']));
+//            } else {
+//                $ii = date('n月', strtotime('+' . $i . ' months', $this->data['currproArray']['intime']));
+//            }
+//            $this->data['months'][$i]['month'] = $ii;
+//        }
         // 标段
         // 搜索有没有相应的月份,有就把实际赋值,没有就为零
         $this->data['MeasureArray'] = $this->actmeasure->getRowsByPid($this->params['pid']);
+        $totalstid = 0;
+        $monthArray = [];
         foreach ($this->data['MeasureArray'] as $key => $value) {
             $this->data['MeasureArray'][$key]['pmid'] = $value['pmid'];
             $this->data['MeasureArray'][$key]['type'] = $this->contractact->getRowByStid($value['stid'])['stname'];
-            $numArray = $this->numofperact->getRowByPmid2($value['pmid']);
-            $num = $num1 = 0;
-            $this->data['MeasureArray'][$key]['num'] = $this->data['MeasureArray'][$key]['num1'] = NULL;
-            foreach ($numArray as $k => $v) {
-                if ($v['currstatus'] == 'checked') {
-                    $monthInt = date('n月', $v['audittime']);
-                    $retval = in_array($monthInt, $monthz);
-                    if ($retval) {
-                        $num = round(($v['currdone'] / $value['contracttotal']) * 100);
-                        $num1 = round(($v['curralltotal'] / $value['contracttotal']) * 100);
-                    }
-                }
-                $this->data['MeasureArray'][$key]['num'] .= $num . ',';
-                $this->data['MeasureArray'][$key]['num1'] .= $num1 . ',';
-            }
+            $totalstid += $this->actmeasure->getTotal($value['stid'])['total'];
+//            $numArray = $this->numofperact->getRowByPmid2($value['pmid']);
+//            $num = $num1 = 0;
+//            $this->data['MeasureArray'][$key]['num'] = $this->data['MeasureArray'][$key]['num1'] = NULL;
+//            foreach ($numArray as $k => $v) {
+//                if ($v['currstatus'] == 'checked') {
+//                    $monthInt = date('n月', $v['audittime']);
+//                    $retval = in_array($monthInt, $monthz);
+//                    if ($retval) {
+//                        $num = round(($v['currdone'] / $value['contracttotal']) * 100);
+//                        $num1 = round(($v['curralltotal'] / $value['contracttotal']) * 100);
+//                    }
+//                }
+//                $this->data['MeasureArray'][$key]['num'] .= $num . ',';
+//                $this->data['MeasureArray'][$key]['num1'] .= $num1 . ',';
+//            }
             $this->data['MeasureArray'][$key]['totalnum'] = $this->numofperact->getCountTotalnum($value['pmid']);
             $this->data['MeasureArray'][$key]['totalplus'] = number_format($this->actmeasure->getRowByPmid($value['pmid'])['contracttotal'], 2, '.', ',');
             $this->data['MeasureArray'][$key]['stopnow'] = $this->numofperact->getStopNowTotal($value['pmid'])['sntotal'];
@@ -174,7 +177,59 @@ class SProjectController extends DooController
                 } else {
                     $this->data['MeasureArray'][$key]['ownstatus'] = '审批中';
                 }
+
+            // 分组出年月 每个月份的独立相加  累计完成总量
+            $month = $this->numofperact->getCurrTotalStMonthNoCheckno($value['stid']);
+            foreach ($month as $k => $v) {
+                $allmonth[] = $v;
+                if (!in_array($v['month'], $monthArray))
+                    $monthArray[] = $v['month'];
+            }
+
+            // 分组出年月 每个月份的独立相加   本月完成总量
+            $month1 = $this->numofperact->getCurrDoneStMonthNoCheckno($value['stid']);
+            foreach ($month1 as $k => $v) {
+                $allmonth1[] = $v;
+            }
+        }
+
+        // 中文表述年月
+        $total = $total1 = array();
+        $startyear = $cnymArray = array();
+        foreach ($monthArray as $kk => $vv) {
+            $ymarray = explode('-', $vv);
+            if (!in_array($ymarray[0], $startyear))
+                $startyear[] = $ymarray[0];
+        }
+        $thismonth = 0;
+        foreach($startyear as $sk => $sv){
+            for($i = 1; $i <= 12; $i++){
+                $j = $i < 10 ? '0'.$i : $i;
+                $month = $sv.'-'.$j;
+                $thismonth1 = 0;
+                foreach ($allmonth as $keyk => $valuev) {
+                    if ($valuev['month'] == $month)
+                        $thismonth += $valuev['currtotal'];
+                }
+                $total[] = $thismonth != 0 ? $thismonth : 0;
+                foreach ($allmonth1 as $k1 => $v1) {
+                    if ($v1['month'] == $month)
+                        $thismonth1 += $v1['currdone'];
+                }
+                $total1[] = $thismonth1 != 0 ? $thismonth1 : 0;
+                $cnymArray[] = $i == 1 ? '\'' .$sv.'年'.$i.'月'. '\'' : '\'' .$i.'月'. '\'';
+            }
+        }
+        foreach ($total as $value2) {
+            $total3[] = round(($value2 / $totalstid) * 100);
         }
+        foreach ($total1 as $value11) {
+            $total4[] = round(($value11 / $totalstid) * 100);
+        }
+        $this->data['projectDate'] = implode(',', $cnymArray);
+        $this->data['t1'] = implode(',', $total3);
+        $this->data['t2'] = implode(',', $total4);
+
         $this->render('s-project-section', $this->data, TRUE);
     }
 
@@ -228,7 +283,7 @@ class SProjectController extends DooController
         $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'] > 0)) {
+            if ($value['currdone'] > 0 && $measureArray['contracttotal'] > $value['currdone']) {
                 $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
             } else {
                 $this->data['MeasureArray'][$key]['lessTotal'] = 0;

+ 669 - 0
protected/controller/ShareController.php

@@ -0,0 +1,669 @@
+<?php
+Doo::loadClass('shareact');
+Doo::loadClass('contractact');
+Doo::loadClass('actmeasure');
+Doo::loadClass('project');
+Doo::loadClass('numofperact');
+
+/**
+ * MainController
+ * Feel free to delete the methods and replace them with your own code.
+ *
+ * @author darkredz
+ */
+class ShareController extends DooController
+{
+    private $__shareact, $__contractact, $__actMeasure, $__pro, $__numofperact, $statusArray = array('uncheck' => '<span class = "colGray">未上报</span>', 'checking' => '<span class = "colOrange">审核中</span>', 'checked' => '<span class = "colGreen">已完成</span>', 'checkno' => '<span class = "colRed">不通过</span>');
+
+//    public function beforeRun($resource, $action) {
+//        if ($this->auth->getUid()) {
+//            $uGroups = $this->profile->getProWithUid($this->auth->getUid());
+//            $falg = Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
+//            if (!$falg)
+//                return Doo::acl()->defaultFailedRoute;
+//        }else {
+//            return Doo::acl()->defaultFailedRoute;
+//        }
+//    }
+
+    public function __construct()
+    {
+        $this->__shareact = new Shareact();
+        $this->__contractact = new Contractact();
+        $this->__actMeasure = new actMeasure();
+        $this->__pro = new Project();
+        $this->__numofperact = new NumofperAct();
+        $this->data['rootUrl'] = Doo::conf()->APP_URL;
+//        $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
+    }
+
+    public function error()
+    {
+
+        $this->render('w-share-erro', $this->data, TRUE);
+    }
+
+    public function project()
+    {
+        $shareRowArray = $this->__shareact->getOne($this->params['hashcode']);
+        if (!isset($shareRowArray['ids']) || !isset($shareRowArray['idtype']) || $shareRowArray['idtype'] != 1) {
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        $this->data['hashcode'] = $this->params['hashcode'];
+        if ($shareRowArray['ids'] > 0) {
+            $proArray = $this->__pro->getRowByPid($shareRowArray['ids']);
+        }
+        // 总价
+        if ($shareRowArray['ids']) {
+            $this->data['pros']['numMeasure'] = $this->__actMeasure->getMearsureCount($shareRowArray['ids']);
+            $this->data['pros']['contracttotal'] = $this->__actMeasure->getTotalWithPid($shareRowArray['ids']);
+            $this->data['pros']['changTotal'] = $this->__numofperact->getChangTotal($shareRowArray['ids']);
+            $this->data['pros']['currdone'] = $this->__numofperact->getCurrDoneNow($shareRowArray['ids']);
+            if ($this->data['pros']['contracttotal']) {
+                $this->data['pros']['pcurrdone'] = round(($this->data['pros']['currdone'] / $this->data['pros']['contracttotal']) * 100) . '%';
+            } else {
+                $this->data['pros']['pcurrdone'] = '0%';
+            }
+            $this->data['pros']['bcontracttotal'] = number_format($this->data['pros']['contracttotal'], 2, '.', ',');
+            $this->data['pros']['bchangTotal'] = number_format($this->data['pros']['changTotal'], 2, '.', ',');
+
+        } else {
+            $this->data['pros'] = [];
+        }
+        // 标段计量分布
+        $conArray = $this->__contractact->getRowByPid($shareRowArray['ids']);
+        $this->data['projectDate'] = '';
+        $this->data['conArray'][] = array();
+        $this->data['pid'] = $shareRowArray['ids'];
+        $this->data['conArray'] = $conArray;
+        $contracttotal = 0;
+        $totalstid = 0;
+        $monthArray = [];
+        $allmonth = [];
+        $allmonth1 = [];
+        foreach ($this->data['conArray'] as $k => $v) {
+            $this->data['conArray'][$k]['pstopnow'] = $this->data['conArray'][$k]['pscurrdone'] = 0;
+            $retval = $this->__actMeasure->getAllbyStidSum($v['stid']);
+            $contracttotal += $retval[0]['contracttotal'];
+            $totalstid += $this->__actMeasure->getTotal($v['stid'])['total'];
+            $total = $this->__actMeasure->getTotal($v['stid'])['total'];
+            if ($total) {
+                $this->data['conArray'][$k]['total'] = round($total, 2);
+            } else {
+                $this->data['conArray'][$k]['total'] = 0;
+            }
+            $sntotal = $this->__numofperact->getCountTotalSTID2($v['stid'])['totalplus'];
+            if ($sntotal) {
+                $this->data['conArray'][$k]['stopnow'] = round($sntotal, 2);
+            } else {
+                $this->data['conArray'][$k]['stopnow'] = 0;
+            }
+            $this->data['conArray'][$k]['currdone'] = $this->__numofperact->getCurrDoneSt($v['stid'])['currdone'];
+            if ($this->data['conArray'][$k]['total'] > 0) {
+                $this->data['conArray'][$k]['pstopnow'] = round(($this->data['conArray'][$k]['stopnow'] / $this->data['conArray'][$k]['total']) * 100);
+                $this->data['conArray'][$k]['pscurrdone'] = round(($this->data['conArray'][$k]['currdone'] / $this->data['conArray'][$k]['total']) * 100);
+            }
+            // 分组出年月 每个月份的独立相加
+            $month = $this->__numofperact->getCurrTotalStMonthNoCheckno($v['stid']);
+            foreach ($month as $key => $value) {
+                $allmonth[] = $value;
+                if (!in_array($value['month'], $monthArray))
+                    $monthArray[] = $value['month'];
+            }
+
+            // 分组出年月 每个月份的独立相加
+            $month1 = $this->__numofperact->getCurrDoneStMonthNoCheckno($v['stid']);
+            foreach ($month1 as $key => $value) {
+                $allmonth1[] = $value;
+            }
+        }
+
+        // 中文表述年月
+        $total = $total1 = array();
+        $startyear = $cnymArray = array();
+        foreach ($monthArray as $kk => $vv) {
+//            foreach ($allmonth as $keyk => $valuev) {
+//                if ($valuev['month'] == $vv)
+//                    $total[$kk] += $valuev['currtotal'];
+//            }
+//            foreach ($allmonth1 as $k1 => $v1) {
+//                if ($v1['month'] == $vv)
+//                    $total1[$kk] += $v1['currdone'];
+//            }
+//            $ymarray = split('-', $vv);
+            $ymarray = explode('-', $vv);
+            if (!in_array($ymarray[0], $startyear))
+                $startyear[] = $ymarray[0];
+//            $cnym = '\'' . $ymarray[1] . '月' . '\'';
+//            if ($kk == 0)
+//                $cnym = '\'' . $ymarray[0] . '年' . $ymarray[1] . '月' . '\'';
+//            $cnymArray[] = $cnym;
+        }
+        $thismonth = 0;
+        foreach($startyear as $sk => $sv){
+            for($i = 1; $i <= 12; $i++){
+                $j = $i < 10 ? '0'.$i : $i;
+                $month = $sv.'-'.$j;
+                $thismonth1 = 0;
+                foreach ($allmonth as $keyk => $valuev) {
+                    if ($valuev['month'] == $month)
+                        $thismonth += $valuev['currtotal'];
+                }
+                $total[] = $thismonth != 0 ? $thismonth : 0;
+                foreach ($allmonth1 as $k1 => $v1) {
+                    if ($v1['month'] == $month)
+                        $thismonth1 += $v1['currdone'];
+                }
+                $total1[] = $thismonth1 != 0 ? $thismonth1 : 0;
+                $cnymArray[] = $i == 1 ? '\'' .$sv.'年'.$i.'月'. '\'' : '\'' .$i.'月'. '\'';
+            }
+        }
+        foreach ($total as $value2) {
+            $total3[] = round(($value2 / $totalstid) * 100);
+        }
+        foreach ($total1 as $value11) {
+            $total4[] = round(($value11 / $totalstid) * 100);
+        }
+
+        $this->data['projectDate'] = implode(',', $cnymArray);
+        $this->data['t1'] = implode(',', $total3);
+        $this->data['t2'] = implode(',', $total4);
+        // 标段计量进度
+        // 项目按月进度
+        // 标段列表
+        $contractArray = $this->__contractact->getRowByPid($shareRowArray['ids']); // 获取合同段
+        $htmlstr = NULL;
+        foreach ($contractArray as $k => $v) {// 获取所有合同段
+            $retval = $this->__actMeasure->getAllbyStid($v['stid']); // 获取标段
+            $bdhtmlstr = NULL;
+            $bdhtmlstr = '<thead>
+				    <tr><th class="taC taCble header"  width="225">标段名</th><th class="taC" width="140">计量期数</th><th width="115" class="taC">总价</th><th class="taC" width="">截止上期完成/本期完成/未完成</th></tr></thead>
+				<tbody>';
+            $biaoduantotalmoney = 0;
+            $currTotal = 0;
+            $progress = $otherprogress = '0%';
+            $currTotal = $this->__numofperact->getCountTotalSTID2($v['stid']);
+            foreach ($retval as $key => $value) {
+                $displayPercentSnTotalProgress = '0%';
+                $displayPercentCurrTotalProgress = '0%';
+                $displayPercentLessTotalProgress = '0%';
+                $snTotalProgress = $currTotalProgress = $lessTotalProgress = '0%';
+                $nTotalProgress = $ncurrTotalProgress = $nlessTotalProgress = number_format(0, 2, '.', ',');
+                $numCount = $this->__numofperact->getCountTotalnum2($value['pmid']); // 获取标段已有期数
+                if (isset($numCount['numpname'])) {
+                    $lastStatusArray = $this->__numofperact->getMaxStatusTimes($value['pmid'], $numCount['numpname']);
+                } else {
+                    $lastStatusArray['currstatus'] = 'uncheck';
+                    $numCount['numpname'] = 0;
+                }
+                $totalplus = $this->__numofperact->getCountTotalplus($value['pmid']);
+                $snTotal = $this->__numofperact->getStopNowTotal($value['pmid']); //根据标段ID获取最新一期(包括不通过)
+                $currcomTotal = $this->__numofperact->getCurrdoneNew($value['pmid']); //截止目前
+                $numStatusArray = $this->__numofperact->getLastStatus2($shareRowArray['ids'], $value['pmid']);
+                if ($numCount > 0) {
+                    $nTotalProgress = number_format($snTotal['sntotal'], 2, '.', ',');
+                    $ncurrTotalProgress = number_format($currcomTotal['currtotal'], 2, '.', ',');
+                    $nlessTotalProgress = number_format($value['contracttotal'] - $snTotal['sntotal'] - $currcomTotal['currtotal'], 2, '.', ',');
+                    if (isset($value['contracttotal']) && ($value['contracttotal'] > 0)) {
+                        $snTotalProgress = round(($snTotal['sntotal'] / $value['contracttotal']) * 100);
+                        $currTotalProgress = round(($currcomTotal['currtotal'] / $value['contracttotal']) * 100);
+//			$lessTotalProgress = round((($value['contracttotal'] - ($currcomTotal['currtotal'] + $snTotal['sntotal'])) / $value['contracttotal']) * 100);
+                        $lessTotalProgress = 100 - $snTotalProgress - $currTotalProgress;
+                        $displayPercentSnTotalProgress = $snTotalProgress . '%';
+                        $displayPercentCurrTotalProgress = $currTotalProgress . '%';
+                        $displayPercentLessTotalProgress = $lessTotalProgress . '%';
+                    }
+                }
+                $biaoduantotalmoney += $value['contracttotal'];
+                $totalmoney = number_format($value['contracttotal'], 2, '.', ',');
+                if (isset($numStatusArray['currstatus'])) {
+                    $statusStr = $this->statusArray[$lastStatusArray['currstatus']];
+                } else {
+                    $statusStr = '';
+                }
+                $bdhtmlstr .= '
+				<tr>
+					<td><a href="/share/project/tender/' . $value['pmid'] . '/' . $this->params['hashcode'] . '">' . $value['pmname'] . '</a></td>
+					<td class="">共 ' . $numCount['numpname'] . ' 期(本期 ' . $statusStr . ')</td>
+					<td class="taR">¥' . $totalmoney . '</td>
+					<td>
+					    <div class="progress">
+						<div class="bar bar-success" style="width: ' . $displayPercentSnTotalProgress . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="截止上期完成:¥' . $nTotalProgress . '">' . $displayPercentSnTotalProgress . '</div>
+						<div class="bar" style="width:' . $displayPercentCurrTotalProgress . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="本期完成:¥' . $ncurrTotalProgress . '">' . $displayPercentCurrTotalProgress . '</div>
+						<div class="bar bar-gary" style="width:' . $displayPercentLessTotalProgress . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="未完成:¥' . $nlessTotalProgress . '">' . $displayPercentLessTotalProgress . '</div>
+					    </div>
+					</td>
+				    </tr>';
+            }
+            $nprogress = $notherprogress = NULL;
+//	    $currTotal = $this->numofperact->getCurrdoneSTID($v['stid']);
+            if ($biaoduantotalmoney > 0) {
+                $nprogress = number_format($currTotal['totalplus'], 2, '.', ',');
+                $notherprogress = number_format($biaoduantotalmoney - $currTotal['totalplus'], 2, '.', ',');
+                $progress = round(($currTotal['totalplus'] / $biaoduantotalmoney) * 100) . '%'; // 累计完成计量 所有标段合计
+                $otherprogress = round((($biaoduantotalmoney - $currTotal['totalplus']) / $biaoduantotalmoney) * 100) . '%';
+                $biaoduantotalmoney = number_format($biaoduantotalmoney, 2, '.', ',');
+            }
+            $htmlstr .= '<div class="project">
+			<div class="proSection">
+			    <table class="table">
+				<thead>
+				    <tr>
+					<td width="150"><span aria-hidden="true" data-icon="u"></span> ' . $v['stname'] . '<a id="idt_' . $v['stid'] . '" href="#secoption" data-toggle="modal" title="编辑/查看KEY" stid="' . $v['stid'] . '" proname="' . $v['stname'] . '" key="' . $v['stkey'] . '"><span data-icon="S" aria-hidden="true" class="closePanel" data-placement="bottom" data-toggle="tooltip" data-original-title="查看KEY" style="font-size:18px"></span></a></td>
+					<td width="90">总价:</td><td width="165">¥<b style="font-size:16px">' . $biaoduantotalmoney . '</b></td>
+					<td width="60">完成进度:</td><td><div class="progress">
+						<div class="bar bar-success" style="width:' . $progress . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="累计完成:¥' . $nprogress . '">' . $progress . '</div>
+						<div class="bar bar-danger" style="width:' . $otherprogress . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="未完成:¥' . $notherprogress . '">' . $otherprogress . '</div>
+					    </div></td>
+				    </tr>
+				</thead>
+			    </table>
+			    <table class="table table-striped table-hover tablelist">
+				' . $bdhtmlstr . '
+				</tbody>
+			    </table>
+			</div>
+		    </div>';
+        }
+        $this->data['htmlstr'] = $htmlstr;
+        $this->data['pname'] = $proArray['pname'];
+        $this->render('w-share-project', $this->data);
+    }
+
+    public function proTender()
+    {
+        $shareRowArray = $this->__shareact->getOne($this->params['hashcode']);
+        if (!isset($shareRowArray['ids']) || !isset($shareRowArray['idtype']) || $shareRowArray['idtype'] != 1) {
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        // 判断有效性
+        // 判断hashcode有效性
+        // 判断标段ID是否属于当前分享父类ID
+
+// 总价
+        $mArray = $this->__actMeasure->getRowByPmid($this->params['tenderid']);
+        if(empty($mArray)){
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        $proArray = $mArray;
+
+        //来源url
+        $this->data['comefromurl'] = Doo::conf()->APP_URL.'share/project/'.$this->params['hashcode'];
+
+        $this->data['pmname'] = $mArray['pmname'];
+        if ($proArray['pid']) {
+            $this->data['pros']['numMeasure'] = $this->__actMeasure->getMearsureCount($proArray['pid']);
+            $this->data['pros']['contracttotal'] = $this->__actMeasure->getTotalWithPid($proArray['pid']);
+            $this->data['pros']['changTotal'] = $this->__numofperact->getChangTotal($proArray['pid']);
+            $this->data['pros']['currdone'] = $this->__numofperact->getCurrDoneNow($proArray['pid']);
+            if ($this->data['pros']['contracttotal']) {
+                $this->data['pros']['pcurrdone'] = round(($this->data['pros']['currdone'] / $this->data['pros']['contracttotal']) * 100) . '%';
+            } else {
+                $this->data['pros']['pcurrdone'] = '0%';
+            }
+            $this->data['pros']['bcontracttotal'] = number_format($this->data['pros']['contracttotal'], 2, '.', ',');
+            $this->data['pros']['bchangTotal'] = number_format($this->data['pros']['changTotal'], 2, '.', ',');
+
+        } else {
+            $this->data['pros'] = [];
+        }
+// 图表
+        $this->data['MeasureArray'] = $this->__numofperact->getGroupByLastOne($this->params['tenderid']);
+        $this->data['totalnum'] = count($this->data['MeasureArray']);
+        $measureArray = $this->__actMeasure->getRowByPmid($this->params['tenderid']);
+        foreach ($this->data['MeasureArray'] as $key => $value) {
+            $lastStatusArray = $this->__numofperact->getMaxStatusTimes($value['pmid'], $value['numpname']);
+            $this->data['status'] = $this->statusArray[$lastStatusArray['currstatus']];
+            if ($measureArray['contracttotal'] > $value['currdone'] && $value['currdone'] > 0) {
+                $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
+            } else {
+                $this->data['MeasureArray'][$key]['lessTotal'] = 0;
+            }
+        }
+
+        $this->render('w-share-project-section-detail', $this->data, TRUE);
+    }
+
+    public function section()
+    {
+        $shareRowArray = $this->__shareact->getOne($this->params['hashcode']);
+        if (!isset($shareRowArray['ids']) || !isset($shareRowArray['idtype']) || $shareRowArray['idtype'] != 2) {
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        $this->data['hashcode'] = $this->params['hashcode'];
+
+        $conArray = $this->__contractact->getRowByStid($shareRowArray['ids']);
+        if(empty($conArray)){
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        $this->data['secname'] = $conArray['stname'];
+        $biaoduantotalmoney = 0;
+        $retval = $this->__actMeasure->getAllbyStid($shareRowArray['ids']); // 获取标段
+        $totalretval = $this->__actMeasure->getTotal($shareRowArray['ids']); //获取标段总价格
+        $currTotal = $this->__numofperact->getCountTotalSTID2($shareRowArray['ids']);
+        $this->data['stidArray'] = $retval;
+        $totalstid = $totalretval['total'];
+        $contracttotal = 0;
+        $monthArray = [];
+        foreach ($this->data['stidArray'] as $k => $v) {
+            //获取标段类型总价
+            $biaoduantotalmoney += $v['contracttotal'];
+
+            // 分组出年月 每个月份的独立相加
+            $month = $this->__numofperact->getCurrTotalPmMonth($v['pmid']);
+            foreach ($month as $key => $value) {
+                $allmonth[] = $value;
+                if (!in_array($value['month'], $monthArray))
+                    $monthArray[] = $value['month'];
+            }
+
+            // 分组出年月 每个月份的独立相加
+            $month1 = $this->__numofperact->getCurrDonePmMonth($v['pmid']);
+            foreach ($month1 as $key => $value) {
+                $allmonth1[] = $value;
+            }
+
+            $displayPercentSnTotalProgress = '0%';
+            $displayPercentCurrTotalProgress = '0%';
+            $displayPercentLessTotalProgress = '0%';
+            $snTotalProgress = $currTotalProgress = $lessTotalProgress = '0%';
+            $nTotalProgress = $ncurrTotalProgress = $nlessTotalProgress = number_format(0, 2, '.', ',');
+            $numCount = $this->__numofperact->getCountTotalnum2($v['pmid']); // 获取标段已有期数
+            if (isset($numCount['numpname'])) {
+                $lastStatusArray = $this->__numofperact->getMaxStatusTimes($v['pmid'], $numCount['numpname']);
+            } else {
+                $lastStatusArray['currstatus'] = 'uncheck';
+                $numCount['numpname'] = 0;
+            }
+            $this->data['stidArray'][$k]['qi'] = $numCount['numpname'];
+            $numStatusArray = $this->__numofperact->getLastStatus2($v['pid'], $v['pmid']);
+            if (isset($numStatusArray['currstatus'])) {
+                $statusStr = $this->statusArray[$lastStatusArray['currstatus']];
+            } else {
+                $statusStr = '';
+            }
+            $this->data['stidArray'][$k]['statusStr'] = $statusStr;
+            $this->data['stidArray'][$k]['totalmoney'] = number_format($v['contracttotal'], 2, '.', ',');
+            $totalplus = $this->__numofperact->getCountTotalplus($v['pmid']);
+            $snTotal = $this->__numofperact->getStopNowTotal($v['pmid']); //根据标段ID获取最新一期(包括不通过)
+            $currcomTotal = $this->__numofperact->getCurrdoneNew($v['pmid']); //截止目前
+            $numStatusArray = $this->__numofperact->getLastStatus2($v['pid'], $v['pmid']);
+            if ($numCount > 0) {
+                $this->data['stidArray'][$k]['nTotalProgress'] = number_format($snTotal['sntotal'], 2, '.', ',');
+                $this->data['stidArray'][$k]['ncurrTotalProgress'] = number_format($currcomTotal['currtotal'], 2, '.', ',');
+                $this->data['stidArray'][$k]['nlessTotalProgress'] = number_format($v['contracttotal'] - $snTotal['sntotal'] - $currcomTotal['currtotal'], 2, '.', ',');
+                if (isset($v['contracttotal']) && ($v['contracttotal'] > 0)) {
+                    $snTotalProgress = round(($snTotal['sntotal'] / $v['contracttotal']) * 100);
+                    $currTotalProgress = round(($currcomTotal['currtotal'] / $v['contracttotal']) * 100);
+//			$lessTotalProgress = round((($value['contracttotal'] - ($currcomTotal['currtotal'] + $snTotal['sntotal'])) / $value['contracttotal']) * 100);
+                    $lessTotalProgress = 100 - $snTotalProgress - $currTotalProgress;
+                    $this->data['stidArray'][$k]['displayPercentSnTotalProgress'] = $snTotalProgress . '%';
+                    $this->data['stidArray'][$k]['displayPercentCurrTotalProgress'] = $currTotalProgress . '%';
+                    $this->data['stidArray'][$k]['displayPercentLessTotalProgress'] = $lessTotalProgress . '%';
+                }
+            }
+        }
+
+        if ($biaoduantotalmoney > 0) {
+            $this->data['st']['nprogress'] = number_format($currTotal['totalplus'], 2, '.', ',');
+            $this->data['st']['notherprogress'] = number_format($biaoduantotalmoney - $currTotal['totalplus'], 2, '.', ',');
+            $this->data['st']['progress'] = round(($currTotal['totalplus'] / $biaoduantotalmoney) * 100) . '%'; // 累计完成计量 所有标段合计
+            $this->data['st']['otherprogress'] = round((($biaoduantotalmoney - $currTotal['totalplus']) / $biaoduantotalmoney) * 100) . '%';
+            $this->data['st']['bcontracttotal'] = number_format($biaoduantotalmoney, 2, '.', ',');
+        }
+
+
+        // 中文表述年月
+        $total = $total1 = array();
+        foreach ($monthArray as $kk => $vv) {
+            foreach ($allmonth as $keyk => $valuev) {
+                if ($valuev['month'] == $vv)
+                    $total[$kk] += $valuev['currtotal'];
+            }
+            foreach ($allmonth1 as $k1 => $v1) {
+                if ($v1['month'] == $vv)
+                    $total1[$kk] += $v1['currdone'];
+            }
+            $ymarray = explode('-', $vv);
+            $cnym = '\'' . $ymarray[1] . '月' . '\'';
+            if ($kk == 0)
+                $cnym = '\'' . $ymarray[0] . '年' . $ymarray[1] . '月' . '\'';
+            $cnymArray[] = $cnym;
+        }
+        foreach ($total as $value2) {
+            $total3[] = round(($value2 / $totalstid) * 100);
+        }
+        foreach ($total1 as $value11) {
+            $total4[] = round(($value11 / $totalstid) * 100);
+        }
+        $this->data['projectDate'] = implode(',', $cnymArray);
+        $this->data['t1'] = implode(',', $total3);
+        $this->data['t2'] = implode(',', $total4);
+
+        $this->render('w-share-project-section', $this->data);
+    }
+
+    public function secTender()
+    {
+        $shareRowArray = $this->__shareact->getOne($this->params['hashcode']);
+        if (!isset($shareRowArray['ids']) || !isset($shareRowArray['idtype']) || $shareRowArray['idtype'] != 2) {
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        // 判断hashcode有效性
+// 总价
+        $mArray = $this->__actMeasure->getRowByPmid($this->params['tenderid']);
+        if(empty($mArray)){
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        $proArray = $mArray;
+
+        //来源url
+        $this->data['comefromurl'] = Doo::conf()->APP_URL.'share/section/'.$this->params['hashcode'];
+
+        $this->data['pmname'] = $mArray['pmname'];
+        if ($proArray['pid']) {
+            $this->data['pros']['numMeasure'] = $this->__actMeasure->getMearsureCount($proArray['pid']);
+            $this->data['pros']['contracttotal'] = $this->__actMeasure->getTotalWithPid($proArray['pid']);
+            $this->data['pros']['changTotal'] = $this->__numofperact->getChangTotal($proArray['pid']);
+            $this->data['pros']['currdone'] = $this->__numofperact->getCurrDoneNow($proArray['pid']);
+            if ($this->data['pros']['contracttotal']) {
+                $this->data['pros']['pcurrdone'] = round(($this->data['pros']['currdone'] / $this->data['pros']['contracttotal']) * 100) . '%';
+            } else {
+                $this->data['pros']['pcurrdone'] = '0%';
+            }
+            $this->data['pros']['bcontracttotal'] = number_format($this->data['pros']['contracttotal'], 2, '.', ',');
+            $this->data['pros']['bchangTotal'] = number_format($this->data['pros']['changTotal'], 2, '.', ',');
+
+        } else {
+            $this->data['pros'] = [];
+        }
+// 图表
+        $this->data['MeasureArray'] = $this->__numofperact->getGroupByLastOne($this->params['tenderid']);
+        $this->data['totalnum'] = count($this->data['MeasureArray']);
+        $measureArray = $this->__actMeasure->getRowByPmid($this->params['tenderid']);
+        foreach ($this->data['MeasureArray'] as $key => $value) {
+            $lastStatusArray = $this->__numofperact->getMaxStatusTimes($value['pmid'], $value['numpname']);
+            $this->data['status'] = $this->statusArray[$lastStatusArray['currstatus']];
+            if ($measureArray['contracttotal'] > $value['currdone'] && $value['currdone'] > 0) {
+                $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
+            } else {
+                $this->data['MeasureArray'][$key]['lessTotal'] = 0;
+            }
+        }
+
+        $this->render('w-share-project-section-detail', $this->data, TRUE);
+    }
+
+    public function tender()
+    {
+        $shareRowArray = $this->__shareact->getOne($this->params['hashcode']);
+        if (!isset($shareRowArray['ids']) || !isset($shareRowArray['idtype']) || $shareRowArray['idtype'] != 3) {
+            return Doo::conf()->APP_URL . 'share/error';
+        }
+        $this->data['hashcode'] = $this->params['hashcode'];
+// 总价
+        if ($shareRowArray['ids'] > 0) {
+            $mArray = $this->__actMeasure->getRowByPmid($shareRowArray['ids']);
+            if(empty($mArray)){
+                return Doo::conf()->APP_URL . 'share/error';
+            }
+            $proArray = $mArray;
+        }
+        //来源url
+        $this->data['comefromurl'] = Doo::conf()->APP_URL.'share/tender/'.$this->params['hashcode'];
+
+        $this->data['pmname'] = $mArray['pmname'];
+        if ($proArray['pid']) {
+            $this->data['pros']['numMeasure'] = $this->__actMeasure->getMearsureCount($proArray['pid']);
+            $this->data['pros']['contracttotal'] = $this->__actMeasure->getTotalWithPid($proArray['pid']);
+            $this->data['pros']['changTotal'] = $this->__numofperact->getChangTotal($proArray['pid']);
+            $this->data['pros']['currdone'] = $this->__numofperact->getCurrDoneNow($proArray['pid']);
+            if ($this->data['pros']['contracttotal']) {
+                $this->data['pros']['pcurrdone'] = round(($this->data['pros']['currdone'] / $this->data['pros']['contracttotal']) * 100) . '%';
+            } else {
+                $this->data['pros']['pcurrdone'] = '0%';
+            }
+            $this->data['pros']['bcontracttotal'] = number_format($this->data['pros']['contracttotal'], 2, '.', ',');
+            $this->data['pros']['bchangTotal'] = number_format($this->data['pros']['changTotal'], 2, '.', ',');
+
+        } else {
+            $this->data['pros'] = [];
+        }
+// 图表
+        $this->data['MeasureArray'] = $this->__numofperact->getGroupByLastOne($shareRowArray['ids']);
+        $this->data['totalnum'] = count($this->data['MeasureArray']);
+        $measureArray = $this->__actMeasure->getRowByPmid($shareRowArray['ids']);
+        foreach ($this->data['MeasureArray'] as $key => $value) {
+            $lastStatusArray = $this->__numofperact->getMaxStatusTimes($value['pmid'], $value['numpname']);
+            $this->data['status'] = $this->statusArray[$lastStatusArray['currstatus']];
+            if ($measureArray['contracttotal'] > $value['currdone'] && $value['currdone'] > 0) {
+                $this->data['MeasureArray'][$key]['lessTotal'] = round(($value['currdone'] / $measureArray['contracttotal']) * 100);
+            } else {
+                $this->data['MeasureArray'][$key]['lessTotal'] = 0;
+            }
+        }
+
+        $this->render('w-share-project-section-detail', $this->data, true);
+    }
+
+    public function getShare()
+    {
+        $page = null;
+        $fildArray = null;
+        $proArray = $this->__shareact->getHashCode($_POST['pid'],1);
+        if(!empty($proArray)){
+            $proname = $this->__pro->getRowByPid($_POST['pid']);
+            $page = 1;
+            $fildArray[] = array('id' => $proArray['ids'], 'name' => $proname['pname'], 'ischeckd' => '1', 'hashcode' => $proArray['hashcode']);
+        }else{
+            $fildArray = null;
+            $tmpArray = $this->__contractact->getRowByPid($_POST['pid']);
+            foreach ($tmpArray as $key => $value) {
+                $secArray = $this->__shareact->getSectionCount($value['stid']);
+                if (!empty($secArray)) {
+                    $page = 2;
+                    $fildArray[] = array('id' => $value['stid'], 'name' => $value['stname'], 'ischeckd' => '1', 'hashcode' => $secArray['hashcode']);
+                } else {
+                    $fildArray[] = array('id' => $value['stid'], 'name' => $value['stname'], 'ischeckd' => '0', 'hashcode' => $secArray['hashcode']);
+                }
+            }
+            if($page != 2 && $page != 1){
+                $fildArray = null;
+                $tmp = $this->__actMeasure->getRowsByPid($_POST['pid']);
+                foreach ($tmp as $key => $value) {
+                    $tenArray = $this->__shareact->getHashCode($value['pmid'],3);
+                    if(!empty($tenArray)){
+                        $page = 3;
+                        $fildArray[] = array('id' => $value['pmid'], 'name' => $value['pmname'],'ischeckd' => '1', 'hashcode' => $tenArray['hashcode']);
+                    }else{
+                        $fildArray[] = array('id' => $value['pmid'], 'name' => $value['pmname'],'ischeckd' => '0', 'hashcode' => $tenArray['hashcode']);
+                    }
+                }
+            }
+        }
+        if($page == null){
+            $page = null;
+            $fildArray = null;
+        }
+        die(json_encode(array('page' => $page, 'filearray' => $fildArray)));
+    }
+
+    public function setShare()
+    {
+        if($_POST['check'] == "true"){
+            if ($this->__shareact->getCount($_POST['id'], $_POST['type']) > 0) {
+                $returnVal = $this->__shareact->updateHashcode($_POST['id'], $_POST['type']);
+            } else {
+                $returnVal = $this->__shareact->insertHashcode($_POST['id'], $_POST['type']);
+            }
+        }else{
+            $returnVal = $this->__shareact->deleteHashcode($_POST['id'], $_POST['type']);
+            $returnVal['hashcode'] = '';
+        }
+
+        die(json_encode(array('sharecode' => $returnVal['hashcode'])));
+
+//        if (isset($_POST['stid'])) {
+//            if ($this->__shareact->getCount($_POST['stid'], 2) > 0) {
+//                $returnVal = $this->__shareact->updateHashcode($_POST['stid'], 2);
+//            } else {
+//                $returnVal = $this->__shareact->insertHashcode($_POST['stid'], 2);
+//            }
+//            die(json_encode(array('sharecode' => $returnVal['hashcode'])));
+//        }
+//        if(isset($_POST['pmid'])) {
+//            if ($this->__shareact->getCount($_POST['pmid'], 3) > 0) {
+//                $returnVal = $this->__shareact->updateHashcode($_POST['pmid'], 3);
+//            } else {
+//                $returnVal = $this->__shareact->insertHashcode($_POST['pmid'], 3);
+//            }
+//            die(json_encode(array('sharecode' => $returnVal['hashcode'])));
+//        }
+
+    }
+
+    public function ajaxGetProject()
+    {
+        $proArray = $this->__shareact->getHashCode($_POST['pid'],1);
+        $proname = $this->__pro->getRowByPid($_POST['pid']);
+        if(!empty($proArray)){
+            $fildArray[] = array('id' => $proArray['ids'], 'name' => $proname['pname'], 'ischeckd' => '1', 'hashcode' => $proArray['hashcode']);
+        }else{
+            $fildArray[] = array('id' => $_POST['pid'], 'name' => $proname['pname'], 'ischeckd' => '0', 'hashcode' => $proArray['hashcode']);
+        }
+        die(json_encode($fildArray));
+    }
+
+    public function ajaxGetSection()
+    {
+        $fildArray = null;
+        $tmpArray = $this->__contractact->getRowByPid($_POST['pid']);
+        foreach ($tmpArray as $key => $value) {
+            $secArray = $this->__shareact->getSectionCount($value['stid']);
+            if (!empty($secArray)) {
+                $fildArray[] = array('id' => $value['stid'], 'name' => $value['stname'], 'ischeckd' => '1', 'hashcode' => $secArray['hashcode']);
+            } else {
+                $fildArray[] = array('id' => $value['stid'], 'name' => $value['stname'], 'ischeckd' => '0', 'hashcode' => $secArray['hashcode']);
+            }
+        }
+        die(json_encode($fildArray));
+    }
+
+    public function ajaxGetTender()
+    {
+        $fildArray = array();
+        $tmp = $this->__actMeasure->getRowsByPid($_POST['pid']);
+        foreach ($tmp as $key => $value) {
+            $tenArray = $this->__shareact->getHashCode($value['pmid'],3);
+            if(!empty($tenArray)){
+                $fildArray[] = array('id' => $value['pmid'], 'name' => $value['pmname'],'ischeckd' => '1', 'hashcode' => $tenArray['hashcode']);
+            }else{
+                $fildArray[] = array('id' => $value['pmid'], 'name' => $value['pmname'],'ischeckd' => '0', 'hashcode' => $tenArray['hashcode']);
+            }
+        }
+        die(json_encode($fildArray));
+    }
+
+}
+
+?>

+ 26 - 0
protected/model/share.php

@@ -0,0 +1,26 @@
+<?php
+
+Doo::loadCore('db/DooModel');
+
+/**
+ * 用户表
+ */
+class Share extends DooModel {
+
+    public $sid;
+    public $hashcode;
+    public $ids;
+    public $idtype;
+    public $intime;
+    public $endtime;
+    public $_table = 'jl_share';
+    public $_primarykey = 'sid';
+    public $_fields = array('sid', 'hashcode', 'ids', 'idtype', 'intime', 'endtime');
+
+    public function __construct() {
+        parent::setupModel(__CLASS__);
+    }
+
+}
+
+?>

+ 1 - 1
protected/model/uprofile.php

@@ -20,7 +20,7 @@ class Uprofile extends DooModel
     public $isnotice;
     public $_table = 'jl_user_profiles';
     public $_primarykey = 'userid';
-    public $_fields = array('userid', 'name', 'company', 'jobs', 'phone', 'mobile', 'qq', 'groups', 'avatar', 'isnotice');
+    public $_fields = array('userid', 'name', 'company', 'jobs', 'phone', 'mobile', 'qq', 'groups', 'avatar', 'isnotice', 'remark');
 
     public function __construct()
     {

+ 40 - 1
protected/module/admin/controller/AdminController.php

@@ -7,6 +7,9 @@ Doo::loadModel('users');
 Doo::loadClass('profile');
 Doo::loadClass('PasswordHash');
 Doo::loadClass('mailer');
+Doo::loadClass('measureauditact');
+Doo::loadClass('project');
+Doo::loadClass('actmeasure');
 /*
  * To change this license header, choose License Headers in Project Properties.
  * To change this template file, choose Tools | Templates
@@ -19,7 +22,7 @@ Doo::loadClass('mailer');
 class AdminController extends DooController
 {
 
-    private $data, $users, $user, $profile, $ph, $userz, $mailer;
+    private $data, $users, $user, $profile, $ph, $userz, $mailer, $project, $actmeasure, $measureauditact;
 
     public function beforeRun($resource, $action)
     {
@@ -35,6 +38,9 @@ class AdminController extends DooController
         $this->userz = new Users();
         $this->profile = new Profile();
         $this->mailer = new Mailer();
+        $this->project = new Project();
+        $this->actmeasure = new actMeasure();
+        $this->measureauditact = new MeasureauditAct();
         $this->ph = new PasswordHash(8, FALSE);
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
     }
@@ -63,6 +69,7 @@ class AdminController extends DooController
                 return Doo::conf()->APP_URL . 'manage/user/add';
             }
         }
+        $this->data['menu'] = 3;
         $this->render('admin-addUser', $this->data, TRUE);
     }
 
@@ -92,6 +99,37 @@ class AdminController extends DooController
             $this->profile->upProfile($this->params['uid'], $_POST);
             return Doo::conf()->APP_URL . 'manage/user/list';
         }
+
+        //获取该用户审批标段,创建的标段,创建的项目
+        $mnflist = $this->measureauditact->getUserPmid($this->params['uid']);
+        if(!empty($mnflist)){
+            foreach($mnflist as $k => $v){
+                $pmmsg = $this->actmeasure->getRowByPmid($v['pmid']);
+                $mnflist[$k]['pmname'] = $pmmsg['pmname'];
+                $promsg = $this->project->getRowByPid($pmmsg['pid']);
+                $mnflist[$k]['pname'] = $promsg['pname'];
+            }
+            $this->data['mnflist'] = $mnflist;
+        }
+
+        $mnflist2 = $this->actmeasure->getPmidRow($this->params['uid']);
+        if(!empty($mnflist2)){
+            foreach($mnflist2 as $k2 => $v2){
+                $promsg = $this->project->getRowByPid($v2['pid']);
+                $mnflist2[$k2]['pname'] = $promsg['pname'];
+                $mnflist2[$k2]['intime'] = date('Y-m-d H:i:s',$v2['intime']);
+            }
+            $this->data['mnflist2'] = $mnflist2;
+        }
+
+        $prolist = $this->project->getRowUid($this->params['uid']);
+        if(!empty($prolist)){
+            foreach($prolist as $k3 => $v3){
+                $prolist[$k3]['intime'] = date('Y-m-d H:i:s',$v3['intime']);
+            }
+            $this->data['prolist'] = $prolist;
+        }
+        $this->data['menu'] = 2;
         $this->render('admin-editUser', $this->data, TRUE);
     }
 
@@ -148,6 +186,7 @@ class AdminController extends DooController
                 $this->data['userlist'][$key]['name'] = $proArray['name'];
                 $this->data['userlist'][$key]['company'] = $proArray['company'];
                 $this->data['userlist'][$key]['jobs'] = $proArray['jobs'];
+                $this->data['userlist'][$key]['remark'] = $proArray['remark'];
                 $this->data['userlist'][$key]['phone'] = $proArray['phone'];
                 $this->data['userlist'][$key]['mobile'] = $proArray['mobile'];
                 $this->data['userlist'][$key]['isstop'] = $value['isstop'];

File diff ditekan karena terlalu besar
+ 254 - 0
protected/module/admin/controller/ProController.php


+ 27 - 3
protected/module/admin/model/ameasure.php

@@ -5,7 +5,8 @@ Doo::loadCore('db/DooModel');
 /**
  * 用户表
  */
-class Ameasure extends DooModel {
+class Ameasure extends DooModel
+{
 
     public $pmid;
     public $pid;
@@ -17,11 +18,13 @@ class Ameasure extends DooModel {
     public $_primarykey = 'pmid';
     public $_fields = array('pmid', 'pid', 'stid', 'uid', 'pmname', 'contracttotal');
 
-    public function __construct() {
+    public function __construct()
+    {
         parent::setupModel(__CLASS__);
     }
 
-    public function getRowAll($pid = 0) {
+    public function getRowAll($pid = 0)
+    {
         if ($pid > 0) {
             return $this->find(array('where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE));
         } else {
@@ -29,6 +32,27 @@ class Ameasure extends DooModel {
         }
     }
 
+    public function getTotalRow($pid = 0)
+    {
+        return $this->count(array('where' => 'pid=?', 'param' => array($pid)));
+
+    }
+
+    public function getRowswith($stid)
+    {
+        return $this->find(array('where' => 'stid=?', 'param' => array($stid), 'asArray' => TRUE));
+    }
+
+    public function getRowNum($stid)
+    {
+        return $this->count(array('where' => 'stid=?', 'param' => array($stid), 'asArray' => TRUE));
+    }
+
+    public function del($pmid)
+    {
+        return $this->delete(array('where' => 'pmid=?', 'param' => array($pmid)));
+    }
+
 }
 
 ?>

+ 38 - 5
protected/module/admin/model/measureaudit.php

@@ -5,7 +5,8 @@ Doo::loadCore('db/DooModel');
 /**
  * 用户表
  */
-class AmeasureAudit extends DooModel {
+class AmeasureAudit extends DooModel
+{
 
     public $maid;
     public $pid;
@@ -24,12 +25,44 @@ class AmeasureAudit extends DooModel {
     public $_primarykey = 'maid';
     public $_fields = array('maid', 'pid', 'creatoruid', 'auditoruid', 'mpid', 'pmid', 'stid', 'numpname', 'times', 'mastatus', 'last', 'audittime', 'auditcontent');
 
-    public function __construct() {
-	parent::setupModel(__CLASS__);
+    public function __construct()
+    {
+        parent::setupModel(__CLASS__);
     }
 
-    function getPmidWithStatus($uid, $status) {
-	return $this->getOne(array('where' => 'mastatus=?', 'param' => array($status), 'asArray' => TRUE));
+    function getPmidWithStatus($uid, $status)
+    {
+        return $this->getOne(array('where' => 'mastatus=?', 'param' => array($status), 'asArray' => TRUE));
+    }
+
+    function getRowData($maid)
+    {
+        return $this->getOne(array('where' => 'maid=?', 'param' => array($maid), 'asArray' => true));
+    }
+
+    function updateStatus($maid, $status)
+    {
+        $this->mastatus = $status;
+        $this->audittime = time();
+        return $this->update(array('where' => 'maid=?', 'param' => array($maid)));
+    }
+
+    function getAuditsByMpid($mpid){
+        return $this->find(array('select' => 'maid, auditoruid, mastatus, auditcontent', 'where' => 'mpid=?', 'asc' => 'last', 'desc' => 'maid', 'param' => array($mpid), 'asArray' => TRUE));
+    }
+
+    function getNumAuditsByMpid($mpid){
+        return $this->count(array('where' => 'mpid=?', 'param' => array($mpid), 'asArray' => TRUE));
+    }
+
+    function getAuditByMpidStatus($mpid,$status)
+    {
+        return $this->getOne(array('where' => 'mpid=? and mastatus=?', 'param' => array($mpid, $status), 'desc' => 'last', 'asc' => 'maid', 'asArray' => TRUE));
+    }
+
+    public function del($maid)
+    {
+        return $this->delete(array('where' => 'maid=?', 'param' => array($maid)));
     }
 
 }

+ 31 - 0
protected/module/admin/model/numofper.php

@@ -30,6 +30,37 @@ class Anumofper extends DooModel {
 	parent::setupModel(__CLASS__);
     }
 
+    //标段下最新一期
+    public function getLastNew2($pmid) {
+        return $this->getOne(array('where' => 'pmid = ?', 'groupby' => 'pmid, numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
+//	return $this->__numofperact->getOne(array('select' => 'stopnowtotal, currdone', 'where' => 'pmid = ? and currstatus!=\'checkno\'', 'orderby' => 'numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
+    }
+
+    public function getMaxStatusTimes($pmid, $numpname) {
+        return $this->getOne(array('select' => 'currstatus', 'where' => 'pmid=? and numpname=?', 'param' => array($pmid, $numpname), 'desc' => 'times', 'asArray' => TRUE));
+    }
+
+    //获取标段的所有期数
+    public function getGroupByLastOne2($pmid) {
+        return $this->find(array('where' => 'pmid=?', 'groupby' => 'numpname', 'desc' => 'numpname', 'param' => array($pmid), 'asArray' => TRUE));
+    }
+
+    public function getRowByMpid($mpid) {
+        return $this->getOne(array('where' => 'mpid=?', 'param' => array($mpid), 'asArray' => TRUE));
+    }
+
+    //更新数据
+    public function updateAuditStatus($mpid, $statuno = 'checking') {
+        $this->currstatus = $statuno;
+        $this->audittime = $statuno != 'checking' ? time() : 0;
+        return $this->update(array('where' => 'mpid=?', 'param' => array($mpid)));
+    }
+
+    public function del($mpid)
+    {
+        return $this->delete(array('where' => 'mpid=?', 'param' => array($mpid)));
+    }
+
 }
 
 ?>

+ 6 - 0
protected/module/admin/view/admin-addUser.html

@@ -54,6 +54,12 @@
                                     <input type="text" name="phone" placeholder="输入电话号码,0000-0000000">
                                 </div>
                             </div>
+                            <div class="control-group">
+                                <label class="control-label">备注</label>
+                                <div class="controls">
+                                    <input type="text" name="remark" placeholder="输入备注信息">
+                                </div>
+                            </div>
                             <div class="alert alert-info">
                                 添加成功后,系统将会发送一封确认邮件给该用户,邮件中将包含登录密码。
                             </div>

+ 52 - 0
protected/module/admin/view/admin-editUser.html

@@ -61,6 +61,12 @@
                         </div>
                     </div>
                     <div class="control-group">
+                        <label class="control-label">备注</label>
+                        <div class="controls">
+                            <input type="text" name="remark" value="{{profile.remark}}">
+                        </div>
+                    </div>
+                    <div class="control-group">
                         <label class="control-label">短信通知</label>
                         <div class="controls">
                             <input type="text" disabled="disabled" value="{{profile.mobile}}">
@@ -77,6 +83,52 @@
                     </div>
                 </fieldset>
             </form>
+
+            <div class="tabbable">
+                <ul class="nav nav-tabs">
+                    <li class="active"><a href="#tab1" data-toggle="tab">该用户审批标段</a></li>
+                    <li><a href="#tab2" data-toggle="tab">该用户创建标段</a></li>
+                    <li><a href="#tab3" data-toggle="tab">该用户创建项目</a></li>
+                </ul>
+                <div class="tab-content">
+                    <div class="tab-pane active" id="tab1">
+                        <table class="table table-striped">
+                            <thead>
+                            <tr><th>标段名称</th><th>所属项目</th></tr>
+                            </thead>
+                            <tbody>
+                            <!-- loop mnflist -->
+                            <tr><td>{{mnflist' value.pmname}}</td><td>{{mnflist' value.pname}}</td></tr>
+                            <!-- endloop -->
+                            </tbody>
+                        </table>
+                    </div>
+                    <div class="tab-pane" id="tab2">
+                        <table class="table table-striped">
+                            <thead>
+                            <tr><th>标段名称</th><th>所属项目</th><th>创建时间</th></tr>
+                            </thead>
+                            <tbody>
+                            <!-- loop mnflist2 -->
+                            <tr><td>{{mnflist2' value.pmname}}</td><td>{{mnflist2' value.pname}}</td><td>{{mnflist2' value.intime}}</td></tr>
+                            <!-- endloop -->
+                            </tbody>
+                        </table>
+                    </div>
+                    <div class="tab-pane" id="tab3">
+                        <table class="table table-striped">
+                            <thead>
+                            <tr><th>项目名称</th><th>创建时间</th></tr>
+                            </thead>
+                            <tbody>
+                            <!-- loop prolist -->
+                            <tr><td>{{prolist' value.pname}}</td><td>{{prolist' value.intime}}</td></tr>
+                            <!-- endloop -->
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
             <!--		    <div class="userPrj">
                                     <legend>该用户参与的标段</legend>
                                     <table class="table table-striped">

+ 223 - 0
protected/module/admin/view/admin-period.html

@@ -0,0 +1,223 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<div class="wrapHeader">
+    <h1 class="mainLogo" title="纵横计量支付"></h1>
+    <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
+            title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
+</div>
+<!-- include "top" -->
+<div class="warpAdmin">
+    <!-- include "menu" -->
+    <div class="adminContent">
+        <div class="adminMain">
+            <legend><a href="{{rootUrl}}manage/item/{{pid}}/section">返回标段列表</a></legend>
+            <!-- loop pmArray -->
+            <table class="table table-striped table-hover">
+                <legend><!-- if {{keymax}} == {{pmArray' value.numpname}} --><a mpid="{{pmArray' value.mpid}}"
+                                                                                id="adelete" href="#delperiod"
+                                                                                class="fR btn btn-link colGray"
+                                                                                times="{{pmArray' value.times}}"
+                                                                                nums = "{{pmArray' value.numpname}}"
+                                                                                data-toggle="modal">删除本期#{{pmArray' value.times}}</a>
+                    <!-- endif -->第{{pmArray' value.numpname}}期 #{{pmArray' value.times}}
+                </legend>
+                <thead>
+                <tr>
+                    <th>审批流程</th>
+                    <th>审批人</th>
+                    <th>审批状态</th>
+                    <th>审批意见</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody>
+                <!-- loop pmArray' value.audits -->
+                <tr>
+                    <td>{{pmArray' value' value.numaudit}}审</td>
+                    <td>{{pmArray' value' value.name}}{{pmArray' value' value.company}}</td>
+                    <td><span class="{{pmArray' value' value.colors}}">{{pmArray' value' value.status}}</span></td>
+                    <td>{{pmArray' value' value.auditcontent}}</td>
+                    <td>
+                        <!-- if {{keymax}} == {{pmArray' value.numpname}} -->
+                        <!-- if {{pmArray' value' value.enable}} == '2' -->
+                        <a href="#checking" id="achecking" maid="{{pmArray' value' value.maid}}" data-toggle="modal"
+                           class="colOrange">审核中</a>
+                        <!-- endif -->
+                        <!-- if {{pmArray' value' value.enable}} == '1' -->
+                        <a href="#unpass" id="aunpass" maid="{{pmArray' value' value.maid}}" data-toggle="modal"
+                           class="colRed">不通过</a>
+                        <a href="#pass" id="apass" maid="{{pmArray' value' value.maid}}" data-toggle="modal" class="colGreen">通过</a>
+                        <!-- endif -->
+                        <!-- endif -->
+                    </td>
+                </tr>
+                <!-- endloop -->
+                </tbody>
+            </table>
+            <!-- endloop -->
+        </div>
+    </div>
+</div>
+<!--不通过-->
+<div class="modal hide fade" id="unpass">
+    <input id="maid" name="maid" value="0" type="hidden"/>
+    <input id="mpid" name="mpid" value="0" type="hidden"/>
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>设置审批不通过</h3>
+    </div>
+    <div class="modal-body">
+        <p>确认是否设置该审批人审批状态为审批不通过?</p>
+    </div>
+    <div class="modal-footer">
+        <button id="btnunpass" class="btn btn-danger">确认</button>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+<!--通过-->
+<div class="modal hide fade" id="pass">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>设置审批通过</h3>
+    </div>
+    <div class="modal-body">
+        <p>确认是否设置该审批人审批状态为审批通过?</p>
+    </div>
+    <div class="modal-footer">
+        <button id="btnpass" class="btn btn-success">确认</button>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+<!--审批中-->
+<div class="modal hide fade" id="checking">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>设置审批中</h3>
+    </div>
+    <div class="modal-body">
+        <p>确认是否设置该审批人审批状态为审批中?</p>
+    </div>
+    <div class="modal-footer">
+        <button id="btnchecking" class="btn btn-warning">确认</button>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+<!--删除本期-->
+<div class="modal hide fade" id="delperiod">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除本期#<span class="times"></span></h3>
+    </div>
+    <div class="modal-body">
+        <p>删除本期#<span class="times"></span>(第<span class="times"></span>次审批)后,将退回至上一次审批。</p>
+        <p>当#1被删除后,将退回至上一期。</p>
+        <p>确认是否删除第<span id="nums"></span>期#<span class="times"></span>?</p>
+    </div>
+    <div class="modal-footer">
+        <button id="btndelete" class="btn btn-danger">确认</button>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+
+<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript">
+    $(document).ready(function () {
+        $("#achecking").click(function () {
+            var maid = $(this).attr('maid');
+            $("#maid").val(maid);
+        });
+        $("#aunpass").click(function () {
+            var maid = $(this).attr('maid');
+            $("#maid").val(maid);
+        });
+        $("#apass").click(function () {
+            var maid = $(this).attr('maid');
+            $("#maid").val(maid);
+        });
+        $("#adelete").click(function () {
+            var mpid = $(this).attr('mpid');
+            var times = $(this).attr('times');
+            var nums = $(this).attr('nums');
+            $("#mpid").val(mpid);
+            $(".times").html(times);
+            $("#nums").html(nums);
+        });
+        $("#btnpass").click(function () {
+            var maid = $("#maid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"op": 'pass', "maid": maid},
+                url: "{{rootUrl}}manage/item/{{pmid}}/period",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#delsection2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
+                    }
+                }
+            });
+        });
+        $("#btnunpass").click(function () {
+            var maid = $("#maid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"op": 'unpass', "maid": maid},
+                url: "{{rootUrl}}manage/item/{{pmid}}/period",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#delsection2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
+                    }
+                }
+            });
+        });
+        $("#btndelete").click(function () {
+            var mpid = $("#mpid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"op": 'delete', "mpid": mpid},
+                url: "{{rootUrl}}manage/item/{{pmid}}/period",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#delsection2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
+                    }
+                }
+            });
+        });
+        $("#btnchecking").click(function () {
+            var maid = $("#maid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"op": 'checking', "maid": maid},
+                url: "{{rootUrl}}manage/item/{{pmid}}/period",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#delsection2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
+                    }
+                }
+            });
+        });
+    });
+</script>
+</body>

+ 126 - 0
protected/module/admin/view/admin-project.html

@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<div class="wrapHeader">
+    <h1 class="mainLogo" title="纵横计量支付"></h1>
+    <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
+            title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
+</div>
+<!-- include "top" -->
+<div class="warpAdmin">
+    <!-- include "menu" -->
+    <div class="adminContent">
+        <div class="adminMain">
+            <table class="table table-striped table-hover">
+                <legend>项目列表</legend>
+                <thead>
+                <tr>
+                    <th>项目名称</th>
+                    <th width="40">id</th>
+                    <th>包含标段类型</th>
+                    <th>创建人</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody>
+                <!-- loop pArray -->
+                <tr>
+                    <td><a href="{{rootUrl}}manage/item/{{pArray' value.pid}}/section">{{pArray' value.pname}}</a></td>
+                    <td>{{pArray' value.pid}}</td>
+                    <td>{{pArray' value.mnum}}</td>
+                    <td>{{pArray' value.uname}}</td>
+                    <td><a href="#" id="del_{{pArray' value.pid}}" pid="{{pArray' value.pid}}" proname="{{pArray' value.pname}}"
+                           class="colGray" data-toggle="modal">删除</a>
+                    </td>
+                </tr>
+                <!-- endloop -->
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
+
+<!--删除标段不可删除-->
+<div class="modal hide fade" id="delpoj">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除项目确认</h3>
+    </div>
+    <div class="modal-body">
+        <p>项目下还有标段类型,不能删除该项目。</p>
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal">关闭</button>
+    </div>
+</div>
+<!--删除标段可删除-->
+<div class="modal hide fade" id="delpoj2">
+    <input id="pid" type="hidden" value="0" name="pid"/>
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除项目确认</h3>
+    </div>
+    <div class="modal-body">
+        <p id="tip"></p>
+        <p>删除后,将无法恢复。</p>
+        <p>请谨慎操作!</p>
+    </div>
+    <div class="modal-footer">
+        <a id="delproject" class="btn btn-danger">确认</a>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript">
+    $(document).ready(function () {
+        $("a[id^='del_']").on('click',function () {
+            var pid = $(this).attr('pid');
+            var pname = $(this).attr('proname');
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"type": 'del', "pid": pid},
+                url: "{{rootUrl}}manage/item/index",
+                success: function (data) {
+                    if (data['status'] == "1") {
+                        $("#delpoj").modal('show');
+                    } else {
+                        $("#pid").val(pid);
+                        $("#tip").html("确认删除项目“" + pname + "”?");
+                        $("#delpoj2").modal('show');
+                    }
+
+                }
+            });
+        });
+        $("#delproject").click(function () {
+            var pid = $("#pid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"type": 'delpro', "pid": pid},
+                url: "{{rootUrl}}manage/item/index",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#delpoj2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/index";
+                    }
+                }
+            });
+        });
+    });
+</script>
+</body>

+ 201 - 112
protected/module/admin/view/admin-section.html

@@ -1,114 +1,203 @@
 <!DOCTYPE html>
-<html lang=zh-cn> 
-    <head>
-        <meta charset=utf-8> 
-        <title>纵横计量支付系统</title> 
-        <meta name=description content=计量支付> 
-        <meta name=copyright content=smartcost.com.cn> 
-        <link rel=stylesheet href=css/bootstrap.css> 
-        <link rel=stylesheet href=css/style.css> 
-        <script src=js/jquery-1.9.1.min.js></script> 
-        <script src=js/bootstrap.js></script>  
-        <script src=js/jl.js></script> 
-    </head>
-    <body>
-        <div class="wrapHeader">
-            <h1 class="mainLogo" title="纵横计量支付"></h1>
-            <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<div class="wrapHeader">
+    <h1 class="mainLogo" title="纵横计量支付"></h1>
+    <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
+            title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
+</div>
+<!-- include "top" -->
+<div class="warpAdmin">
+    <!-- include "menu" -->
+    <div class="adminContent">
+        <div class="adminMain">
+            <!-- loop typeArray -->
+            <table class="table table-striped table-hover">
+                <legend><a href="#" data-toggle="modal" id="del_{{typeArray' value.stid}}"
+                           stid="{{typeArray' value.stid}}" stname="{{typeArray' value.stname}}"
+                           class="fR btn btn-link colGray">删除标段类型</a>{{typeArray' value.stname}},key:{{typeArray' value.stkey}}
+                </legend>
+                <thead>
+                <tr>
+                    <th width="40">id</th>
+                    <th>标段名称</th>
+                    <th>创建人</th>
+                    <th>标段总额</th>
+                    <th>标段状态</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody>
+                <!-- loop typeArray' value.datarows -->
+                <!-- if {{typeArray' value' value.stid}} == {{typeArray' value.stid}} -->
+                <tr>
+                    <td>{{typeArray' value' value.stid}}</td>
+                    <td><a href="/manage/item/{{typeArray' value' value.pmid}}/period">{{typeArray' value' value.pmname}}</a></td>
+                    <th>{{typeArray' value' value.name}}{{typeArray' value' value.company}}</th>
+                    <td>{{typeArray' value' value.contracttotal}}</td>
+                    <th><span
+                            class="colOrange">#{{typeArray' value' value.num}} {{typeArray' value' value.status}}</span>
+                    </th>
+                    <td><a href="#" id="delsec_{{typeArray' value' value.pmid}}" pmid="{{typeArray' value' value.pmid}}" proname="{{typeArray' value' value.pmname}}" class="colGray" data-toggle="modal">删除</a></td>
+                </tr>
+                <!-- endif -->
+                <!-- endloop -->
+                </tbody>
+            </table>
+            <!-- endloop -->
         </div>
-        <div class="width960 userInfoPanel clearfix">
-            <p><b>你好,管理员</b>;<a href="admin-option.html">修改密码</a>&nbsp;<a href="admin-login.html">退出</a></p>
-        </div>
-        <div class="warpAdmin">
-            <div class="adminSidebar fL">
-                <ul>
-                    <li><a href="admin-userlist.html" class="now">标段管理</a></li>
-                </ul>
-            </div>
-            <div class="adminContent">
-                <div class="adminMain">
-                    <fieldset>
-                        <legend><select><option>下拉选择项目</option></select></legend>
-                        <table class="table table-striped table-hover">
-                            <thead>
-                                <tr>
-                                    <th>标段名称</th>
-                                    <th>标段类型</th>
-                                    <th>标段总额</th>
-                                    <th>标段状态</th>
-                                    <th>审批人</th>
-                                    <th>操作</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                <tr>
-                                    <td>A</td>
-                                    <td>类型1</td>
-                                    <td>0</td>
-                                    <th><span class="colOrange">#1 审批中</span></th>
-                                    <th><span class="colGreen">陈特(5审)完成</span></th>
-                                    <td><a href="" class="colGray" class="colGray" data-original-title="数据诚可贵,删除有风险" data-toggle="tooltip" data-placement="bottom">删除</a></td>
-                                </tr>
-                                <tr>
-                                    <td>A</td>
-                                    <td>类型1</td>
-                                    <td>0</td>
-                                    <th><span class="colOrange">#2 审批中</span></th>
-                                    <th><span class="colGreen">陈特(5审)完成</span></th>
-                                    <td><a href="" class="colGray" class="colGray" data-original-title="数据诚可贵,删除有风险" data-toggle="tooltip" data-placement="bottom">删除</a></td>
-                                </tr>
-                                <tr>
-                                    <td>B</td>
-                                    <td>类型2</td>
-                                    <td>0</td>
-                                    <th><span class="colGreen">#1 完成</span></th>
-                                    <th><span class="colGreen">陈特(终审)完成</span></th>
-                                    <td><a href="" class="colGray" class="colGray" data-original-title="数据诚可贵,删除有风险" data-toggle="tooltip" data-placement="bottom">删除</a></td>
-                                </tr>
-                                <tr>
-                                    <td>C</td>
-                                    <td>类型3</td>
-                                    <td>0</td>
-                                    <th><span class="colRed">#1 不通过</span></th>
-                                    <th><span class="colRed">陈特(2审)不通过</span></th>
-                                    <td><a href="" class="colGray" data-original-title="数据诚可贵,删除有风险" data-toggle="tooltip" data-placement="bottom">删除</a></td>
-                                </tr>
-                                <tr>
-                                    <td>C</td>
-                                    <td>类型3</td>
-                                    <td>0</td>
-                                    <th><span class="colRed">#1 不通过</span></th>
-                                    <th><span class="colRe">陈特(上报)</span></th>
-                                    <td><a href="" class="colGray" data-original-title="数据诚可贵,删除有风险" data-toggle="tooltip" data-placement="bottom">删除</a></td>
-                                </tr>
-                                <tr>
-                                    <td>D</td>
-                                    <td>类型4</td>
-                                    <td>0</td>
-                                    <th><span class="colGray">#1 未上报</span></th>
-                                    <th></th>
-                                    <td><a href="" class="colGray" class="colGray" data-original-title="数据诚可贵,删除有风险" data-toggle="tooltip" data-placement="bottom">删除</a></td>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </fieldset>
-                </div>
-            </div>
-        </div>
-        <!--重置密码-->
-        <div class="modal hide fade" id="sendpw">
-            <div class="modal-header">
-                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
-                <h3>重置密码成功</h3>
-            </div>
-            <div class="modal-body">
-                <p>系统已将新密码发送至该用户的登录邮箱:<b>sp1@qq.com</b></p>
-                <p>如果长时间无法接收到邮件,请确认该邮箱是否可以正常接收邮件;</p>
-                <p>添加 test@abc.com 至邮箱白名单,再重新操作<b>重置密码</b>。</p>
-            </div>
-            <div class="modal-footer">
-            </div>
-        </div>
-        <!--重置密码-->
-        <script type="text/javascript">autoFlashHeight();</script>
-    </body>
+    </div>
+</div>
+<!--删除标段不可删除-->
+<div class="modal hide fade" id="delsection">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除标段确认</h3>
+    </div>
+    <div class="modal-body">
+        <p>标段下还有期数,不能删除该标段。</p>
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal">关闭</button>
+    </div>
+</div>
+<!--删除本期-->
+<div class="modal hide fade" id="delsection2">
+    <input id="pmid" type="hidden" name="pmid" value="0"/>
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除标段确认</h3>
+    </div>
+    <div class="modal-body">
+        <p id="tippro"></p>
+        <p>删除后,将无法恢复。</p>
+        <p>请谨慎操作!</p>
+    </div>
+    <div class="modal-footer">
+        <a id="delsecok" class="btn btn-danger">确认</a>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+<!--删除标段不可删除-->
+<div class="modal hide fade" id="deltype">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除标段类型确认</h3>
+    </div>
+    <div class="modal-body">
+        <p>标段类型下还有标段,不能删除该标段类型。</p>
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal">关闭</button>
+    </div>
+</div>
+<!--删除标段可删除-->
+<div class="modal hide fade" id="deltype2">
+    <input id="stid" type="hidden" name="stid" value="0"/>
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除标段类型确认</h3>
+    </div>
+    <div class="modal-body">
+        <p id="tip"></p>
+        <p>删除后,将无法恢复。</p>
+        <p>请谨慎操作!</p>
+    </div>
+    <div class="modal-footer">
+        <a id="deltypeok"  class="btn btn-danger">确认</a>
+        <button class="btn" data-dismiss="modal">取消</button>
+    </div>
+</div>
+
+<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript">
+    $(document).ready(function () {
+        $("a[id^='del_']").click(function () {
+            var stid = $(this).attr('stid');
+            var stname = $(this).attr('stname');
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"type": 'del', "stid": stid},
+                url: "{{rootUrl}}manage/item/{{pid}}/section",
+                success: function (data) {
+                    if (data['status'] == "1") {
+                        $("#deltype").modal('show');
+                    } else {
+                        $("#stid").val(stid);
+                        $("#tip").html("确认删除标段类型“" + stname + "”?");
+                        $("#deltype2").modal('show');
+                    }
+
+                }
+            });
+        });
+        $("#deltypeok").click(function () {
+            var stid = $("#stid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"type": 'delpro', "stid": stid},
+                url: "{{rootUrl}}manage/item/{{pid}}/section",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#deltype2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/{{pid}}/section";
+                    }
+                }
+            });
+        });
+
+        $("a[id^='delsec_']").click(function () {
+            var pmid = $(this).attr('pmid');
+            var proname = $(this).attr('proname');
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"type": 'delmcheck', "pmid": pmid},
+                url: "{{rootUrl}}manage/item/{{pid}}/section",
+                success: function (data) {
+                    if (data['status'] == "1") {
+                        $("#delsection").modal('show');
+                    } else {
+                        $("#pmid").val(pmid);
+                        $("#tippro").html("确认删除标段“" + proname + "”?");
+                        $("#delsection2").modal('show');
+                    }
+
+                }
+            });
+        });
+        $("#delsecok").click(function () {
+            var pmid = $("#pmid").val();
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"type": 'delmpro', "pmid": pmid},
+                url: "{{rootUrl}}manage/item/{{pid}}/section",
+                success: function (data) {
+                    if (data['status'] == "ok") {
+                        $("#delsection2").modal('hide');
+                        window.location.href = "{{rootUrl}}manage/item/{{pid}}/section";
+                    }
+                }
+            });
+        });
+    });
+</script>
+</body>

+ 2 - 0
protected/module/admin/view/admin-userlist.html

@@ -31,6 +31,7 @@
                         <th>姓名</th>
                         <th>单位(公司)</th>
                         <th>职位</th>
+                        <th>备注</th>
                         <th>联系电话</th>
                         <th>短信通知</th>
                         <th>邮箱(登录使用)</th>
@@ -44,6 +45,7 @@
                         <td>{{userlist' value.name}}</td>
                         <td>{{userlist' value.company}}</td>
                         <td>{{userlist' value.jobs}}</td>
+                        <td>{{userlist' value.remark}}</td>
                         <td>{{userlist' value.phone}}</td>
                         <td>{{userlist' value.mobile}}</td>
                         <td>{{userlist' value.email}}</td>

+ 1 - 0
protected/module/admin/view/menu.html

@@ -4,5 +4,6 @@
         <li><a href="{{rootUrl}}manage/sys/sms/switch"<!-- if {{menu}}=='4' --> class="now" <!-- endif -->>短信通知</a></li>
         <li><a href="{{rootUrl}}manage/user/list"<!-- if {{menu}}=='2' --> class="now" <!-- endif -->>用户列表</a></li>
         <li><a href="{{rootUrl}}manage/user/add"<!-- if {{menu}}=='3' --> class="now" <!-- endif -->>添加用户</a></li>
+        <li><a href="{{rootUrl}}manage/item/index"<!-- if {{menu}}=='5' --> class="now" <!-- endif -->>项目管理</a></li>
     </ul>
 </div>

+ 375 - 0
protected/view/r-project-section-detail-APP.html

@@ -0,0 +1,375 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
+    <link rel=stylesheet href="{{rootUrl}}global/css/app/bootstrap.css">
+    <link rel=stylesheet href="{{rootUrl}}global/css/app/style.css">
+    <script src="{{rootUrl}}global/js/jquery-1.9.1.min.js"></script>
+    <script src="{{rootUrl}}global/js/app/bootstrap.js"></script>
+    <script src="{{rootUrl}}global/js/app/global.js"></script>
+    <script src="{{rootUrl}}global/js/app/echarts.min.js"></script>
+</head>
+<body>
+    <div class="wrapContent">
+        <div class="wrapNav">
+            <ul class="nav nav-tabs" role="tablist">
+                <li role="presentation" <!-- if !zhisset({{approval}}) -->class="active"<!-- endif -->><a href="#home" aria-controls="home" role="tab" data-toggle="tab">标段概况</a></li>
+                <li role="presentation" <!-- if zhisset({{approval}}) -->class="active"<!-- endif -->><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">审批</a></li>
+            </ul>
+        </div>
+        <div class="tab-content">
+          <div role="tabpanel" class="tab-pane <!-- if !zhisset({{approval}}) -->active<!-- endif -->" id="home">
+            <div class="project">
+                <div class="proSection">
+                    <!--图表4-->
+                    <div id="chartContainer4" style="height: 350px; width: 100%;">
+                    </div>
+                    <!--图表5-->
+                    <div id="chartContainer5" style="height: 300px; width: 100%;">
+                    </div>
+                </div>
+                <div class="projectSeList">
+                    <!-- loop MeasureArray3 -->
+                    <dl class="projectTable">
+                      <dt>第{{ToChinaseNum(MeasureArray3' value.numpname)}}期(上报:{{formatDate(MeasureArray3' value.intime,'Y-m-d')}} <!-- if {{MeasureArray3' value.audittime}}!='0' -->;通过:{{formatDate(MeasureArray3' value.audittime,'Y-m-d')}}<!-- endif -->)</dt>
+                      <dd>
+                        <table class="table table-hover">
+                          <tr>
+                            <td>
+                              <p>本期合同计量</p>
+                              <b>¥{{MeasureArray3' value.currcontractval}}</b>
+                            </td>
+                            <td>
+                              <p>本期数量变更计量</p>
+                              <b>¥{{MeasureArray3' value.currchangeval}}</b>
+                            </td>
+                          </tr>
+                          <tr>
+                            <td>
+                              <p>截止上期完成</p>
+                              <b>¥{{MeasureArray3' value.stopnowtotal}}</b>
+                            </td>
+                            <td>
+                              <p>本期完成计量</p>
+                              <b>¥{{MeasureArray3' value.currdone}}</b>
+                            </td>
+                          </tr>
+                          <tr>
+                            <td>
+                              <p>截止本期完成</p>
+                              <b>¥{{MeasureArray3' value.curralltotal}}</b>
+                            </td>
+                            <td></td>
+                          </tr>
+                        </table>
+                      </dd>
+                    </dl>
+                    <!-- endloop -->
+                </div>
+            </div>
+          </div>
+          <div role="tabpanel" class="tab-pane <!-- if zhisset({{approval}}) -->active<!-- endif -->" id="profile">
+            <div class="project">
+              <div class="projectSeList mT2">
+                <!-- loop MeasureArray2 -->
+                <dl class="projectTable">
+                  <dt>第{{ToChinaseNum(MeasureArray2' value.numpname)}}期(上报:{{formatDate(MeasureArray2' value.intime,'Y-m-d')}} <!-- if {{MeasureArray2' value.audittime}}!='0' -->;通过:{{formatDate(MeasureArray2' value.audittime,'Y-m-d')}}<!-- endif -->)</dt>
+                  <dd>
+                    <table class="table table-hover">
+                      <tr>
+                        <td>
+                          <p>本期合同计量</p>
+                          <b>¥{{MeasureArray2' value.currcontractval}}</b>
+                        </td>
+                        <td>
+                          <p>本期数量变更计量</p>
+                          <b>¥{{MeasureArray2' value.currchangeval}}</b>
+                        </td>
+                      </tr>
+                      <tr>
+                        <td>
+                          <p>截止上期累计完成</p>
+                          <b>¥{{MeasureArray2' value.stopnowtotal}}</b>
+                        </td>
+                        <td>
+                          <p>本期完成计量</p>
+                          <b>¥{{MeasureArray2' value.currdone}}</b>
+                        </td>
+                      </tr>
+                      <tr>
+                        <td>
+                          <p>累计完成计量</p>
+                          <b>¥{{MeasureArray2' value.curralltotal}}</b>
+                        </td>
+                        <td></td>
+                      </tr>
+                    </table>
+                  </dd>
+                </dl>
+                <!-- endloop -->
+              </div>
+            </div>
+            <div class="approvalList">
+              <ul>
+                <!-- if {{orginArray.time}} != '1970-01-01' -->
+                <li>
+                    {{orginArray.statushtml}}
+                    <div class="approvalView"></div>
+                </li>
+                <!-- endif -->
+                <!-- loop auditArray -->
+                <li>
+                  {{auditArray' value.statushtml}}
+                  <div class="approvalView">{{auditArray' value.auditcontent}}</div>
+                </li>
+                <!-- endloop -->
+              </ul>
+            </div>
+            <!-- if {{mastatus}}=='checking' -->
+            <div class="bottomToolsbar">
+              <div class="bottomView">
+                <form>
+                  <div class="form-group">
+                    <label>审批意见</label>
+                    <textarea class="form-control" rows="3"></textarea>
+                  </div>
+                </form> 
+              </div>
+              <ul>
+                <li><button type="button" class="submit btn-danger" data-toggle="modal" data-target="#myModalUnpass">审批不通过</button></li>
+                <li><button type="button" class="submit btn-success" data-toggle="modal" data-target="#myModalPass">审批通过</button></li>
+              </ul>
+            </div>
+            <div class="modal fade modalWrap" id="myModalUnpass" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
+              <div class="modal-dialog" role="document">
+                <div class="modal-content">
+                  <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                    <h4 class="modal-title">审批意见</h4>
+                  </div>
+                  <div class="modal-body">
+                    <!-- <h4><p>审批意见</p></h4> -->
+                      <form>
+                    <textarea  name="content" id="content" class="form-control" rows="3" placeholder="填写审批意见"></textarea>
+                      </form>
+                  </div>
+                  <div class="modal-footer">
+                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+                    <button type="button" class="btn btn-danger auditclass" act="np" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}" times="{{times}}">确认审批不通过</button>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="modal fade modalWrap" id="myModalPass" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
+              <div class="modal-dialog" role="document">
+                <div class="modal-content">
+                  <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                    <h4 class="modal-title">审批意见</h4>
+                  </div>
+                  <div class="modal-body">
+                    <!-- <h4><p>审批意见</p></h4> -->
+                      <form>
+                          <textarea  name="content" id="content2" class="form-control" rows="3" placeholder="填写审批意见"></textarea>
+                      </form>
+                  </div>
+                  <div class="modal-footer">
+                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+                    <button type="button" class="btn btn-success auditclass" act="p" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
+                            times="{{times}}" id="pass">确认审批通过</button>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <!-- endif -->
+          </div>
+        </div>
+    </div>
+
+    <script type="text/javascript">
+        $(function(){
+            $('#chartContainer4').css('width',(parseInt($(window).width())-36+'px'));
+            $('#chartContainer5').css('width',(parseInt($(window).width())-36+'px'));
+            //4 标段期数计量进度//
+            var myChart = echarts.init(document.getElementById('chartContainer4'));
+            var option = {
+                color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
+                    '#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
+                    '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
+                    '#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
+                tooltip: {
+                    trigger: 'axis'
+                },
+                calculable: true,
+                legend: {
+                    data: ['本期合同计量', '本期数量变更计量', '截止上期完成', '本期完成计量', '完成度']
+                },
+                dataZoom : {
+                    show : true,
+                    start :0,
+                    end : 100
+                },
+                xAxis: [
+                    {
+                        type: 'category',
+                        splitLine: {show: true},
+                        data: [
+                            <!-- loop MeasureArray -->
+                            "第{{ToChinaseNum(MeasureArray' value.numpname)}}期",
+                            <!-- endloop -->
+                        ]
+                    }
+                ],
+                grid:[
+                    {
+                        x2:'40',
+                        top:'25%',
+                        bottom:'20%',
+                        left:'13%'
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: 'value',
+                        position: 'left',
+                        splitArea: {show: true}
+                    },
+                    {
+                        type: 'value',
+                        name: '完成度',
+                        axisLabel: {
+                            formatter: '{value} %'
+                        },
+                        position: 'right',
+                        splitArea: {show: false},
+                        splitLine: {show: false}
+                    }
+                ],
+                series: [
+                    {
+                        name: '本期合同计量',
+                        type: 'bar',
+                        tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                        stack: '合同',
+                        data: [
+                            <!-- loop MeasureArray -->
+                            {{MeasureArray' value.currcontractval}},
+                            <!-- endloop -->
+                        ]
+                    },
+                    {
+                        name: '本期数量变更计量',
+                        type: 'bar',
+                        tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                        stack: '合同',
+                        data: [
+                            <!-- loop MeasureArray -->
+                            {{MeasureArray' value.currchangeval}},
+                            <!-- endloop -->
+                        ]
+                    },
+                    {
+                        name: '截止上期完成',
+                        type: 'bar',
+                        tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                        stack: '完成',
+                        data: [
+                            <!-- loop MeasureArray -->
+                            {{MeasureArray' value.stopnowtotal}},
+                            <!-- endloop -->
+                        ]
+                    },
+                    {
+                        name: '本期完成计量',
+                        type: 'bar',
+                        tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                        stack: '完成',
+                        data: [
+                            <!-- loop MeasureArray -->
+                            {{MeasureArray' value.currdone}},
+                            <!-- endloop -->
+
+                        ]
+                    },
+                    {
+                        name: '完成度',
+                        type: 'line',
+                        tooltip: {trigger: 'axis', formatter: "{b}占总标段<br/>{a}:{c} %"},
+                        yAxisIndex: 1,
+                        data: [
+                            <!-- loop MeasureArray -->
+                            {{MeasureArray' value.lessTotal}},
+                            <!-- endloop -->
+
+                        ]
+                    },
+                ]
+            };
+
+            // 为echarts对象加载数据
+            myChart.setOption(option);
+            //4 标段期数计量进度//
+            //5 期数组成//
+            var myChart2 = echarts.init(document.getElementById('chartContainer5'));
+            var option2 = {
+                color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
+                    '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
+                    '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
+                    '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
+                title : {
+                    text: '期数计量组成',
+                    x:'left'
+                },
+
+                tooltip : {
+                    trigger: 'item',
+                    formatter: "{a} <br/>{b}:{c} 元<br>占标段:{d} %"
+                },
+                calculable : true,
+                series : [
+                    {
+                        name:'标段计量分布',
+                        type:'pie',
+//                          roseType: 'angle',
+                        radius : '40%',
+                        center: ['50%', 155],
+                        data:[
+                            <!-- loop MeasureArray -->{value: {{MeasureArray' value.currdone}}, name: '第{{ToChinaseNum(MeasureArray' value.numpname)}}期'},
+                            <!-- endloop -->]
+                    }
+                ]
+            };
+            // 为echarts对象加载数据
+            myChart2.setOption(option2);
+            //5 期数组成//
+        });
+    </script>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            $(".auditclass").click(function () {
+                var pmid = $(this).attr('pmid');
+                var numpname = $(this).attr('numpname');
+                var times = $(this).attr('times');
+                var content = $(this).parent().parent().find("textarea").val();
+                var act = $(this).attr('act');
+                var maid = $(this).attr('maid');
+                $.ajax({
+                    type: "POST",
+                    dataType: "json",
+                    cache: false,
+                    data: {"act": act, "pmid": pmid, "numpname": numpname, "times": times, "content": content},
+                    url: "/app/rproject/{{pid}}/section/{{pmid}}/detail?uid={{uid}}",
+                    success: function (data) {
+                        if (data['status'] == 1) {
+                            window.location.href = "{{rootUrl}}app/rproject/{{pid}}/section/{{pmid}}/detail?uid={{uid}}&approval=1";
+                        }
+                    }
+                });
+            });
+        })
+    </script>
+</body>

+ 108 - 117
protected/view/r-project-section-detail.html

@@ -11,7 +11,7 @@
     <script src="{{rootUrl}}global/js/jquery-1.9.1.min.js"></script>
     <script src="{{rootUrl}}global/js/bootstrap.js"></script>
     <script src="{{rootUrl}}global/js/jl.js"></script>
-    <script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/1-6-10/esl.js"></script>
+    <script src={{rootUrl}}global/js/echarts.min.js></script>
 </head>
 <body>
 <!-- include "top" -->
@@ -136,125 +136,118 @@
 </div>
 <script type="text/javascript">autoFlashHeight();</script>
 <script type="text/javascript">
-    // 路径配置
-    require.config({
-        paths: {
-            'echarts': 'http://echarts.baidu.com/build/echarts'
-        }
-    });
-
-    // 使用
-    require(
-            [
-                'echarts',
-                'echarts/chart/pie', // 使用柱状图就加载bar模块,按需加载
-                'echarts/chart/bar'
-            ],
-            function (ec) {
-                //4 标段期数计量进度//
-                var myChart = ec.init(document.getElementById('chartContainer4'));
-                var option = {
-                    color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
-                        '#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
-                        '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
-                        '#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
-                    tooltip: {
-                        trigger: 'axis'
-                    },
-                    calculable: true,
-                    legend: {
-                        data: ['本期合同计量', '本期数量变更计量', '截止上期完成', '本期完成计量', '完成度']
-                    },
-                    xAxis: [
-                        {
-                            type: 'category',
-                            splitLine: {show: true},
-                            data: [
-                                <!-- loop MeasureArray -->
-                                '第{{ToChinaseNum(MeasureArray' value.numpname)}}期',
-                                <!-- endloop -->
-                              ]}],
-                              yAxis: [{
-            type: 'value',
-            position: 'left',
-            splitArea: {show: true}
-        },{
-            type: 'value',
-            name: '完成度',
-            axisLabel: {
-                formatter: '{value} %'
-            },
-            position: 'right',
-            splitArea: {show: true}
-        }
-    ],
-            series:[{
-            name: '本期合同计量',
-            type: 'bar',
-            tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
-            stack: '合同',
-            data: [
-                <!-- loop MeasureArray -->
-                {{MeasureArray' value.currcontractval}},
-                <!-- endloop -->
-            ]
-        },
-        {
-            name: '本期数量变更计量',
-            type: 'bar',
-            tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
-            stack: '合同',
-            data: [
-                <!-- loop MeasureArray -->
-                {{MeasureArray' value.currchangeval}},
-                <!-- endloop -->
-            ]
-        },
-        {
-            name: '截止上期完成',
-            type: 'bar',
-            tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
-            stack: '完成',
-            data: [
-                <!-- loop MeasureArray -->
-                {{MeasureArray' value.stopnowtotal}},
-                <!-- endloop -->
-            ]
+$(function (ec) {
+    //4 标段期数计量进度//
+    var myChart = echarts.init(document.getElementById('chartContainer4'));
+    var option = {
+        color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
+            '#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
+            '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
+            '#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
+        tooltip: {
+            trigger: 'axis'
         },
-        {
-            name: '本期完成计量',
-            type: 'bar',
-            tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
-            stack: '完成',
-            data: [
-                <!-- loop MeasureArray -->
-                {{MeasureArray' value.currdone}},
-                <!-- endloop -->
-
-            ]
+        calculable: true,
+        legend: {
+            data: ['本期合同计量', '本期数量变更计量', '截止上期完成', '本期完成计量', '完成度']
         },
-        {
-            name: '完成度',
-            type: 'line',
-            tooltip: {trigger: 'axis', formatter: "{b}占总标段<br/>{a}:{c} %"},
-            yAxisIndex: 1,
-            data: [
-                <!-- loop MeasureArray -->
-                {{MeasureArray' value.lessTotal}},
-                <!-- endloop -->
-
-            ]
+        dataZoom : {
+            show : true,
+            start :0,
+            end : 100
         },
-    ]
-    }
-    ;
-
+        xAxis: [
+            {
+                type: 'category',
+                splitLine: {show: true},
+                data: [
+                    <!-- loop MeasureArray -->
+                    "第{{ToChinaseNum(MeasureArray' value.numpname)}}期",
+                    <!-- endloop -->
+                ]
+            }
+        ],
+        yAxis: [
+            {
+                type: 'value',
+                position: 'left',
+                splitArea: {show: true}
+            },
+            {
+                type: 'value',
+                name: '完成度',
+                axisLabel: {
+                    formatter: '{value} %'
+                },
+                position: 'right',
+                splitArea: {show: false},
+                splitLine: {show: false}
+            }
+        ],
+        series: [
+            {
+                name: '本期合同计量',
+                type: 'bar',
+                tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                stack: '合同',
+                data: [
+                    <!-- loop MeasureArray -->
+                    {{MeasureArray' value.currcontractval}},
+                    <!-- endloop -->
+                ]
+            },
+            {
+                name: '本期数量变更计量',
+                type: 'bar',
+                tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                stack: '合同',
+                data: [
+                    <!-- loop MeasureArray -->
+                    {{MeasureArray' value.currchangeval}},
+                    <!-- endloop -->
+                ]
+            },
+            {
+                name: '截止上期完成',
+                type: 'bar',
+                tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                stack: '完成',
+                data: [
+                    <!-- loop MeasureArray -->
+                    {{MeasureArray' value.stopnowtotal}},
+                    <!-- endloop -->
+                ]
+            },
+            {
+                name: '本期完成计量',
+                type: 'bar',
+                tooltip: {trigger: 'item', formatter: "{b}  <br/>{a}:{c}元"},
+                stack: '完成',
+                data: [
+                    <!-- loop MeasureArray -->
+                    {{MeasureArray' value.currdone}},
+                    <!-- endloop -->
+                ]
+            },
+            {
+                name: '完成度',
+                type: 'line',
+                tooltip: {trigger: 'axis', formatter: "{b}占总标段<br/>{a}:{c} %"},
+                yAxisIndex: 1,
+                data: [
+                    <!-- loop MeasureArray -->
+                    {{MeasureArray' value.lessTotal}},
+                    <!-- endloop -->
+                ]
+            },
+        ]
+    };
     // 为echarts对象加载数据
     myChart.setOption(option);
     //4 标段期数计量进度//
     //5 期数组成//
     // 基于准备好的dom,初始化echarts图表
-    var myChart = ec.init(document.getElementById('chartContainer5'));
+    var myChart2 = echarts.init(document.getElementById('chartContainer5'));
     var option = {
         color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
             '#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
@@ -284,11 +277,9 @@
         ]
     };
     // 为echarts对象加载数据
-    myChart.setOption(option);
+    myChart2.setOption(option);
     //5 期数组成//
-    }
-    )
-    ;
+});
 </script>
 </body>
-</html>
+</html>

+ 1 - 1
protected/view/r-project-section-report.html

@@ -123,7 +123,7 @@
             </div>
             <!--审批操作栏-->
             <!--原报信息-->
-            <!-- if {{orginArray.time}} -->
+            <!-- if {{orginArray.time}} != '1970-01-01' -->
             <div class="reportList">
                 <div class="avatarBar clearfix">
                     <div class="fR">

File diff ditekan karena terlalu besar
+ 231 - 240
protected/view/s-project-section-detail.html


+ 173 - 193
protected/view/s-project-section.html

@@ -1,222 +1,202 @@
 <!DOCTYPE html>
 <html lang=zh-cn>
-    <head>
+<head>
 	<meta charset=utf-8>
 	<title>纵横计量支付系统</title>
 	<meta name=description content=计量支付>
 	<meta name=copyright content=smartcost.com.cn>
-		<meta name="viewport" content="width=device-width,initial-scale=1.0">
+	<meta name="viewport" content="width=device-width,initial-scale=1.0">
 	<link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
 	<link rel=stylesheet href={{rootUrl}}global/css/style.css>
 	<script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
 	<script src={{rootUrl}}global/js/bootstrap.js></script>
 	<script src={{rootUrl}}global/js/jl.js></script>
-	<script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/1-6-10/esl.js"></script>
-    </head>
-    <body>
-	<!-- include "top" -->
-	<div class="wrapContent">
-	    <!-- include "left" -->
-	    <div class="mainContainer">
+	<script src={{rootUrl}}global/js/echarts.min.js></script>
+</head>
+<body>
+<!-- include "top" -->
+<div class="wrapContent">
+	<!-- include "left" -->
+	<div class="mainContainer">
 		<!--内容-->
 		<div class="mainContent">
-		    <div class="title clearfix">
-			<ul class="nav nav-pills">
-			    <li class="dropdown"><a title="返回" href="{{rootUrl}}sproject/index"><span class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
-			    <li class="dropdown">
-				<a href="{{rootUrl}}sproject/{{currproArray.pid}}/section" data-toggle="dropdown" class="dropdown-toggle">
-				    {{currproArray.pname}}<b class="caret"></b>
-				</a>
-				<ul class="dropdown-menu">
-				    <!-- loop allproArray -->
-				    <li><a href="{{rootUrl}}sproject/{{allproArray' value.pid}}/section">{{allproArray' value.pname}}</a></li>
-				    <!-- endloop -->
+			<div class="title clearfix">
+				<ul class="nav nav-pills">
+					<li class="dropdown"><a title="返回" href="{{rootUrl}}sproject/index"><span class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
+					<li class="dropdown">
+						<a href="{{rootUrl}}sproject/{{currproArray.pid}}/section" data-toggle="dropdown" class="dropdown-toggle">
+							{{currproArray.pname}}<b class="caret"></b>
+						</a>
+						<ul class="dropdown-menu">
+							<!-- loop allproArray -->
+							<li><a href="{{rootUrl}}sproject/{{allproArray' value.pid}}/section">{{allproArray' value.pname}}</a></li>
+							<!-- endloop -->
+						</ul>
+					</li>
 				</ul>
-			    </li>
-			</ul>
-		    </div>
-		    <div class="project">
-			<div class="proSection clearfix">
-			    <!--图表5-->
-			    <div class="fL" style="width:30%">
-				<div id="chartContainer6" style="height: 300px; width: 100%;">
+			</div>
+			<div class="project">
+				<div class="proSection clearfix">
+					<!--图表5-->
+					<div class="fL" style="width:30%">
+						<div id="chartContainer6" style="height: 300px; width: 100%;">
+						</div>
+					</div>
+					<!--图表5-->
+					<!--表-->
+					<div class="fL" style="width:70%;height:300px;overflow:hide">
+						<table class="table table-striped">
+							<thead>
+							<tr>
+								<th width="15%">标段名</th><th width="16%" class="taC">总价/期数</th><th width="40%" class="taC">截止上期完成/本期完成/未完成</th>
+							</tr>
+							</thead>
+						</table>
+						<div style="height:264px;overflow-y:auto">
+							<table class="table table-striped">
+								<!-- loop MeasureArray -->
+								<tr>
+									<td width="15%"><a href="{{rootUrl}}sproject/{{MeasureArray' value.pid}}/section/{{MeasureArray' value.pmid}}/detail">{{MeasureArray' value.pmname}}</a><br>{{MeasureArray' value.type}}</td><td width="16%" class="taR">¥<b>{{MeasureArray' value.totalplus}}</b><br>第 {{MeasureArray' value.totalnum}} 期(<span class="colOrange">{{MeasureArray' value.ownstatus}}</span>)</td><td width="40%" class="taR"><div class="progress">
+									<div data-original-title="截止上期完成:¥{{MeasureArray' value.nstopnow}}" data-toggle="tooltip" data-placement="bottom" style="width: {{MeasureArray' value.dispstopnow}};" class="bar bar-success">{{MeasureArray' value.dispstopnow}}</div>
+									<div data-original-title="本期完成:¥{{MeasureArray' value.ncurrdone}}" data-toggle="tooltip" data-placement="bottom" style="width:{{MeasureArray' value.dispcurrdone}}" class="bar">{{MeasureArray' value.dispcurrdone}}</div>
+									<div data-original-title="未完成:¥{{MeasureArray' value.nless}}" data-toggle="tooltip" data-placement="bottom" style="width:{{MeasureArray' value.pless}}" class="bar bar-gary">{{MeasureArray' value.pless}}</div>
+								</div></td>
+								</tr>
+								<!-- endloop -->
+							</table>
+						</div>
+					</div>
+					<!--表-->
 				</div>
-			    </div>
-			    <!--图表5-->
-			    <!--表-->
-			    <div class="fL" style="width:70%;height:300px;overflow:hide">
-				<table class="table table-striped">
-				    <thead>
-					<tr>
-					    <th width="15%">标段名</th><th width="16%" class="taC">总价/期数</th><th width="40%" class="taC">截止上期完成/本期完成/未完成</th>
-					</tr>
-				    </thead>
-				</table>
-				<div style="height:264px;overflow-y:auto">
-				    <table class="table table-striped">
-					<!-- loop MeasureArray -->
-					<tr>
-					    <td width="15%"><a href="{{rootUrl}}sproject/{{MeasureArray' value.pid}}/section/{{MeasureArray' value.pmid}}/detail">{{MeasureArray' value.pmname}}</a><br>{{MeasureArray' value.type}}</td><td width="16%" class="taR">¥<b>{{MeasureArray' value.totalplus}}</b><br>第 {{MeasureArray' value.totalnum}} 期(<span class="colOrange">{{MeasureArray' value.ownstatus}}</span>)</td><td width="40%" class="taR"><div class="progress">
-						    <div data-original-title="截止上期完成:¥{{MeasureArray' value.nstopnow}}" data-toggle="tooltip" data-placement="bottom" style="width: {{MeasureArray' value.dispstopnow}};" class="bar bar-success">{{MeasureArray' value.dispstopnow}}</div>
-						    <div data-original-title="本期完成:¥{{MeasureArray' value.ncurrdone}}" data-toggle="tooltip" data-placement="bottom" style="width:{{MeasureArray' value.dispcurrdone}}" class="bar">{{MeasureArray' value.dispcurrdone}}</div>
-						    <div data-original-title="未完成:¥{{MeasureArray' value.nless}}" data-toggle="tooltip" data-placement="bottom" style="width:{{MeasureArray' value.pless}}" class="bar bar-gary">{{MeasureArray' value.pless}}</div>
-						</div></td>
-					</tr>
-					<!-- endloop -->
-				    </table>
+				<div class="proSection clearfix">
+					<div id="chartContainer7" style="height: 300px; width: 100%;">
+					</div>
 				</div>
-			    </div>
-			    <!--表-->
 			</div>
-			<div class="proSection clearfix">
-			    <div id="chartContainer7" style="height: 300px; width: 100%;">
-			    </div>
-			</div>
-		    </div>
 		</div>
 		<!--内容-->
-	    </div>
 	</div>
-	<script type="text/javascript">autoFlashHeight();</script>
-	<script type="text/javascript">
-	    // 路径配置
-	    require.config({
-		paths: {
-		    'echarts': 'http://echarts.baidu.com/build/echarts'
-		}
-	    });
-	    // 使用
-	    require(
-		    [
-			'echarts',
-			'echarts/chart/pie', // 使用柱状图就加载bar模块,按需加载
-			'echarts/chart/bar'
-		    ],
-		    function (ec) {
-			//5 期数组成//
-			// 基于准备好的dom,初始化echarts图表
-			var myChart = ec.init(document.getElementById('chartContainer6'));
-			var option = {
-			    color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
-				'#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
-				'#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
-				'#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
-			    title: {
-				text: '',
-				x: 'left'
-			    },
-			    tooltip: {
-				trigger: 'item',
-				formatter: "{a} <br/>{b}:<br>{c} 元<br>占标段:{d} %"
-			    },
-			    calculable: true,
-			    series: [
-				{
-				    name: '标段计量分布',
-				    type: 'pie',
-				    radius: '40%',
-				    center: ['50%', 155],
-				    data: [
-					    <!-- loop MeasureArray -->
-					    {value: {{MeasureArray' value.contracttotal}}, name: '{{MeasureArray' value.pmname}}'},
-					    <!-- endloop -->
-				    ]
-				}
-			    ]
-			};
-			// 为echarts对象加载数据
-			myChart.setOption(option);
-			//5 期数组成//
-			//6 标段计量分布//
-			// 基于准备好的dom,初始化echarts图表
-			var myChart = ec.init(document.getElementById('chartContainer7'));
-			var option = {
-			    color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
-				'#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
-				'#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
-				'#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
-			    title: {
-				text: '标段按月进度'
-			    },
-			    tooltip: {
-				trigger: 'axis',
-				formatter: "{b} <br/>{a}:{c} %<br/>{a1}:{c1} %<br/>{a2}:{c2} %"
-			    },
-			    legend: {
-				data:['累计完成','本月完成']
-			    },
-			    toolbox: {
-				show: true,
-				feature: {
-				    magicType: {show: true, type: ['line', 'bar']}
-				}
-			    },
-			    dataZoom: {
-				show: true,
-				realtime: true,
-				start: 0,
-				end: 100
-			    },
-			    xAxis: [
-				{
-				    type: 'category',
-				    boundaryGap: false,
-				    data: [
-					<!-- loop months -->
-					'{{months' value.month}}',
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript">
+// 路径配置
+$(function () {
+	//5 期数组成//
+	// 基于准备好的dom,初始化echarts图表
+	var myChart = echarts.init(document.getElementById('chartContainer6'));
+	var option = {
+		color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
+			'#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
+			'#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
+			'#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
+		title: {
+			text: '',
+			x: 'left'
+		},
+		tooltip: {
+			trigger: 'item',
+			formatter: "{a} <br/>{b}:<br>{c} 元<br>占标段:{d} %"
+		},
+		calculable: true,
+		series: [
+			{
+				name: '标段计量分布',
+				type: 'pie',
+				radius: '40%',
+				center: ['50%', 155],
+				data: [
+					<!-- loop MeasureArray -->
+					{value: {{MeasureArray' value.contracttotal}}, name: '{{MeasureArray' value.pmname}}'},
 					<!-- endloop -->
-				    ]
-				}
-			    ],
-			    yAxis: [
-				{
-				    type: 'value',
-				    axisLabel: {
+				]
+			}
+		]
+	};
+	// 为echarts对象加载数据
+	myChart.setOption(option);
+	//5 期数组成//
+	//6 标段计量分布//
+	// 基于准备好的dom,初始化echarts图表
+	var myChart2 = echarts.init(document.getElementById('chartContainer7'));
+	var option = {
+		color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
+			'#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
+			'#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
+			'#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
+		title: {
+			text: '标段按月进度'
+		},
+		tooltip: {
+			trigger: 'axis',
+			formatter: "{b} <br/>{a}:{c} %<br/>{a1}:{c1} %"
+		},
+		legend: {
+			data:['累计完成','本月完成']
+		},
+		toolbox: {
+			show: true,
+			feature: {
+				magicType: {show: true, type: ['line', 'bar']}
+			}
+		},
+		dataZoom : {
+			show : true,
+			start :0,
+			end : 100
+		},
+		xAxis: [
+			{
+				type: 'category',
+				boundaryGap: true,
+				data: [{{projectDate}}]
+			}
+		],
+		yAxis: [
+			{
+				type: 'value',
+				axisLabel: {
 					formatter: '{value} %'
-				    },
-				    splitArea: {show: true}
-				}
-			    ],
-			    series: [
-				<!-- loop MeasureArray -->
-				{
-				    name: '累计完成',
-				    type: 'line',
-				    itemStyle: {
+				},
+				splitArea : {show : true}
+			}
+		],
+		series: [
+			{
+				name: '累计完成',
+				type: 'line',
+				itemStyle: {
 					normal: {
-					    lineStyle: {
-						shadowColor: 'rgba(0,0,0,0.4)',
-						shadowBlur: 5,
-						shadowOffsetX: 3,
-						shadowOffsetY: 3
-					    }
+						lineStyle: {
+							shadowColor: 'rgba(0,0,0,0.4)',
+							shadowBlur: 5,
+							shadowOffsetX: 3,
+							shadowOffsetY: 3
+						}
 					}
-				    },
-				    data: [{{MeasureArray' value.num}}]
 				},
-				{
-				    name: '本月完成',
-				    type: 'line',
-				    itemStyle: {
+				data: [{{t1}}]
+			},
+			{
+				name: '本月完成',
+				type: 'line',
+				itemStyle: {
 					normal: {
-					    lineStyle: {
-						shadowColor: 'rgba(0,0,0,0.4)',
-						shadowBlur: 5,
-						shadowOffsetX: 3,
-						shadowOffsetY: 3
-					    }
+						lineStyle: {
+							shadowColor: 'rgba(0,0,0,0.4)',
+							shadowBlur: 5,
+							shadowOffsetX: 3,
+							shadowOffsetY: 3
+						}
 					}
-				    },
-				    data: [{{MeasureArray' value.num1}}]
 				},
-				<!-- endloop -->
-			    ]
-			};
-			// 为echarts对象加载数据
-			myChart.setOption(option);
-			//3 标段计量分布//
-		    }
-	    );
-	</script>
-    </body>
+				data: [{{t2}}]
+			},
+		]
+	};
+	// 为echarts对象加载数据
+	myChart2.setOption(option);
+	//3 标段计量分布//
+});
+</script>
+</body>
 </html>

+ 303 - 308
protected/view/w-project-detail.html

@@ -1,335 +1,330 @@
 <!DOCTYPE html>
 <html lang=zh-cn>
-    <head>
+<head>
 	<meta charset="utf-8">
 	<title>纵横计量支付系统</title>
 	<meta name=description content=计量支付>
 	<meta name=copyright content=smartcost.com.cn>
-		<meta name="viewport" content="width=device-width,initial-scale=1.0">
+	<meta name="viewport" content="width=device-width,initial-scale=1.0">
 	<link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
 	<link rel=stylesheet href={{rootUrl}}global/css/style.css>
-    </head>
-    <body>
-	<!-- include "top" -->
-	<div class="wrapContent">
-	    <!-- include "left" -->
-	    <div class="mainContainer">
+</head>
+<body>
+<!-- include "top" -->
+<div class="wrapContent">
+	<!-- include "left" -->
+	<div class="mainContainer">
 		<!--内容-->
 		<div class="mainContent">
-		    <div class="title clearfix">
-			<ul class="nav nav-pills">
-			    <li class="dropdown"><a href="{{rootUrl}}project/index" title="返回"><span class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
-			    <li class="dropdown">
-				<a href="{{rootUrl}}project/{{currProID}}/overview" data-toggle="dropdown" class="dropdown-toggle">
-				    {{currProName}}<b class="caret"></b>
-				</a>
-				<ul class="dropdown-menu">
-				    <!-- loop othrPro -->
-				    <li><a href="{{rootUrl}}project/{{othrPro' value.pid}}/overview">{{othrPro' value.pname}}</a></li>
-				    <!-- endloop -->
+			<div class="title clearfix">
+				<ul class="nav nav-pills">
+					<li class="dropdown"><a href="{{rootUrl}}project/index" title="返回"><span class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
+					<li class="dropdown">
+						<a href="{{rootUrl}}project/{{currProID}}/overview" data-toggle="dropdown" class="dropdown-toggle">
+							{{currProName}}<b class="caret"></b>
+						</a>
+						<ul class="dropdown-menu">
+							<!-- loop othrPro -->
+							<li><a href="{{rootUrl}}project/{{othrPro' value.pid}}/overview">{{othrPro' value.pname}}</a></li>
+							<!-- endloop -->
+						</ul>
+					</li>
 				</ul>
-			    </li>
+				<!--			<div class="fR">
+                                <a href="#pojoption" data-toggle="modal"  class="btn"><i class="icon-cog"></i> 项目设置</a>
+                            </div>-->
+			</div>
+			<!--导航-->
+			<ul class="nav nav-tabs">
+				<li class="active">
+					<a href="{{rootUrl}}project/{{pid}}/overview">项目汇总</a>
+				</li>
+				<li><a href="{{rootUrl}}project/{{pid}}/section">标段列表</a></li>
 			</ul>
-<!--			<div class="fR">
-			    <a href="#pojoption" data-toggle="modal"  class="btn"><i class="icon-cog"></i> 项目设置</a>
-			</div>-->
-		    </div>
-		    <!--导航-->
-		    <ul class="nav nav-tabs">
-			<li class="active">
-			    <a href="{{rootUrl}}project/{{pid}}/overview">项目汇总</a>
-			</li>
-			<li><a href="{{rootUrl}}project/{{pid}}/section">标段列表</a></li>
-		    </ul>
-		    <div class="project">
-			<div class="proSection clearfix">
-			    <!--图表1-->
-			    <div class="fL" style="width:49%">
-				<div id="chartContainer" style="height: 300px; width: 100%;">
+			<div class="project">
+				<div class="proSection clearfix">
+					<!--图表1-->
+					<div class="fL" style="width:49%">
+						<div id="chartContainer" style="height: 300px; width: 100%;">
+						</div>
+					</div>
+					<!--图表1-->
+					<!--图表2-->
+					<div class="fR" style="width:49%">
+						<div id="chartContainer2" style="height: 300px; width: 100%;">
+						</div>
+					</div>
+					<!--图表2-->
 				</div>
-			    </div>
-			    <!--图表1-->
-			    <!--图表2-->
-			    <div class="fR" style="width:49%">
-				<div id="chartContainer2" style="height: 300px; width: 100%;">
+				<div class="proSection clearfix">
+					<!--图表3-->
+					<div id="chartContainer3" style="height: 300px; width: 100%;">
+					</div>
 				</div>
-			    </div>
-			    <!--图表2-->
-			</div>
-			<div class="proSection clearfix">
-			    <!--图表3-->
-			    <div id="chartContainer3" style="height: 300px; width: 100%;">
-			    </div>
 			</div>
-		    </div>
-		    <!--内容-->
+			<!--内容-->
 		</div>
-	    </div>
-	    <!-- 项目设置弹出 -->
-	    <div id="pojoption" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+	</div>
+	<!-- 项目设置弹出 -->
+	<div id="pojoption" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 		<div class="modal-header">
-		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
-		    <h3 id="myModalLabel">项目设置</h3>
+			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+			<h3 id="myModalLabel">项目设置</h3>
 		</div>
 		<div class="modal-body">
 
-		    <div class="form">
-			<form class="form-horizontal">
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">项目名称</label>
-				<div class="controls">
-				    <input type="text" placeholder="输入项目名称" value="黄金大桥项目">
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">颜色标识</label>
-				<div class="controls">
-				    <ul class="pjColorList">
-					<li class="pjColor pj-c1 pjSelect"></li>
-					<li class="pjColor pj-c2"></li>
-					<li class="pjColor pj-c3"></li>
-					<li class="pjColor pj-c4"></li>
-					<li class="pjColor pj-c5"></li>
-					<li class="pjColor pj-c6"></li>
-					<li class="pjColor pj-c7"></li>
-					<li class="pjColor pj-c8"></li>
-				    </ul>
-				</div>
-			    </div>
-			</form>
-		    </div>
+			<div class="form">
+				<form class="form-horizontal">
+					<div class="control-group">
+						<label class="control-label" for="inputEmail">项目名称</label>
+						<div class="controls">
+							<input type="text" placeholder="输入项目名称" value="黄金大桥项目">
+						</div>
+					</div>
+					<div class="control-group">
+						<label class="control-label" for="inputEmail">颜色标识</label>
+						<div class="controls">
+							<ul class="pjColorList">
+								<li class="pjColor pj-c1 pjSelect"></li>
+								<li class="pjColor pj-c2"></li>
+								<li class="pjColor pj-c3"></li>
+								<li class="pjColor pj-c4"></li>
+								<li class="pjColor pj-c5"></li>
+								<li class="pjColor pj-c6"></li>
+								<li class="pjColor pj-c7"></li>
+								<li class="pjColor pj-c8"></li>
+							</ul>
+						</div>
+					</div>
+				</form>
+			</div>
 		</div>
 		<div class="modal-footer">
-		    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
-		    <button class="btn btn-primary">保存</button>
+			<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
+			<button class="btn btn-primary">保存</button>
 		</div>
-	    </div>
-	    <!-- 项目设置弹出 -->
-	    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
-	    <script src={{rootUrl}}global/js/bootstrap.js></script>
-	    <script src={{rootUrl}}global/js/jl.js></script>
-	    <script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/1-6-10/esl.js"></script>
-	    <script type="text/javascript">autoFlashHeight();</script>
-	    <!--导航-->
-	    <script type="text/javascript">
+	</div>
+</div>
+<!-- 项目设置弹出 -->
+<script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+<script src={{rootUrl}}global/js/bootstrap.js></script>
+<script src={{rootUrl}}global/js/jl.js></script>
+<script src={{rootUrl}}global/js/echarts.min.js></script>
+<script type="text/javascript">autoFlashHeight();</script>
+<!--导航-->
+<script type="text/javascript">
 // 路径配置
-			require.config({
-			paths: {
-			'echarts': 'http://echarts.baidu.com/build/echarts'
+$(function() {
+	//1 标段计量分布//
+	// 基于准备好的dom,初始化echarts图表
+	var myChart = echarts.init(document.getElementById('chartContainer'));
+	var option = {
+		color: ['#e9af68','#57b7b6','#e4575a','#959eac','#ffa500',
+			'#d38b70','#8fb7cf','#cd5c5c','#5c616b','#40e0d0',
+			'#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
+			'#6699FF','#ff6666','#3cb371','#b8860b','#30e0e0'],
+		title: {
+			text: '标段计量分布',
+			x: 'left'
+		},
+		tooltip: {
+			trigger: 'item',
+			formatter: "{a} <br/>{b}:{c} <br>占总项目:{d} %"
+		},
+		legend: {
+			selectedMode: false,
+			orient: 'vertical',
+			x: 'left',
+			y: 'center',
+			data: [
+				<!-- loop conArray -->
+				'{{conArray' value.stname}}',
+				<!-- endloop -->
+			]
+		},
+		calculable: true,
+		series: [
+			{
+				name: '标段计量分布',
+				type: 'pie',
+				radius: '60%',
+				center: ['60%', 175],
+				data: [
+					<!-- loop conArray -->
+					{value: {{conArray' value.total}}, name: '{{conArray' value.stname}}'},
+					<!-- endloop -->
+				]
+			}
+		]
+	};
+	// 为echarts对象加载数据
+	myChart.setOption(option);
+	//1 标段计量分布//
+	//2 标段计量进度//
+	var myChart2 = echarts.init(document.getElementById('chartContainer2'));
+	var option = {
+		color:["#e9af68","#57b7b6","#e4575a"],
+		title: {
+			text: '标段计量进度'
+		},
+		tooltip: {
+			trigger: 'axis',
+			formatter: "{b}  <br/>{a}:{c}元 <br/>{a1}:{c1}元<br/>{a2}:{c2} %"
+		},
+		legend: {
+			data: ['总价', '截止本期完成', '完成进度百分比']
+		},
+		xAxis: [
+			{
+				type: 'category',
+				data: [
+					<!-- loop conArray -->
+					'{{conArray' value.stname}}',
+					<!-- endloop -->
+				]
+			}
+		],
+		yAxis: [
+			{
+				type: 'value',
+				name: '金额(元)',
+				position: 'left',
+				axisLabel: {
+					formatter: '{value}'
+				},
+				splitArea: {show: true},
+
+			},
+			{
+				type: 'value',
+				position: 'right',
+				max: '100',
+				axisLabel: {
+					formatter: '{value} %'
+				},
+				splitArea: {show: false},
+				splitLine: {show: false}
 			}
-			});
-			// 使用
-			require(
-				[
-					'echarts',
-					'echarts/chart/pie', // 使用柱状图就加载bar模块,按需加载
-					'echarts/chart/bar'
+		],
+		series: [
+			{
+				name: '总价',
+				type: 'bar',
+				data: [
+					<!-- loop conArray -->
+					{{conArray' value.total}},
+					<!-- endloop -->
 				],
-				function(ec) { 		//1 标段计量分布//
-				// 基于准备好的dom,初始化echarts图表
-				var myChart = ec.init(document.getElementById('chartContainer'));
-					var option = {
-					title: {
-					text: '标段计量分布',
-						x: 'left'
-					},
-						tooltip: {
-						trigger: 'item',
-							formatter: "{a} <br/>{b}:{c} <br>占总项目:{d} %"
-						},
-						legend: {
-						selectedMode: false,
-							orient: 'vertical',
-							x: 'left',
-							y: 'center  ',
-							data: [
-								<!-- loop conArray -->
-								'{{conArray' value.stname}}',
-								<!-- endloop -->
-							]
-						},
-						calculable: true,
-						series: [
-						{
-						name: '标段计量分布',
-							type: 'pie',
-							radius: '60%',
-							center: ['60%', 175],
-							data: [
-								<!-- loop conArray -->
-							{value: {{conArray' value.total}}, name: '{{conArray' value.stname}}'},
-								<!-- endloop -->
-							]
-							}
-							]
-							};
-								// 为echarts对象加载数据
-								myChart.setOption(option);
-								//1 标段计量分布//
-								//2 标段计量进度//
-								var myChart = ec.init(document.getElementById('chartContainer2'));
-								var option = {
-								title: {
-								text: '标段计量进度',
-								},
-									tooltip: {
-									trigger: 'axis',
-										formatter: "{b}  <br/>{a}:{c}元 <br/>{a1}:{c1}元<br/>{a2}:{c2} %"
-									},
-									legend: {
-									data: ['总价', '截止本期完成', '完成进度百分比']
-									},
-									xAxis: [
-									{
-									type: 'category',
-										data: [
-											<!-- loop conArray -->
-											'{{conArray' value.stname}}',
-											<!-- endloop -->
-										]
-									}
-									],
-									yAxis: [
-									{
-									type: 'value',
-										name: '金额',
-										position: 'left',
-										axisLabel: {
-										formatter: '{value}'
-										},
-										splitArea: {show: true}
-									},
-									{
-									type: 'value',
-										position: 'right',
-										max: '100',
-										axisLabel: {
-										formatter: '{value} %'
-										},
-										splitLine: {show: true}
-									}
-									],
-									series: [
-									{
-									name: '总价',
-										type: 'bar',
-										data: [
-								<!-- loop conArray -->
-								    {{conArray' value.total}},
-								<!-- endloop -->
-										],
-									},
-									{
-									name: '截止本期完成',
-										type: 'bar',
-										data: [
-								<!-- loop conArray -->
-								    {{conArray' value.stopnow}},
-								<!-- endloop -->
+			},
+			{
+				name: '截止本期完成',
+				type: 'bar',
+				data: [
+					<!-- loop conArray -->
+					{{conArray' value.stopnow}},
+					<!-- endloop -->
 			    ],
-									},
-									{
-									name: '完成进度百分比',
-										type: 'line',
-										yAxisIndex: 1,
-										data: [
-							<!-- loop conArray -->
-							{{conArray' value.pstopnow}},
-								<!-- endloop -->
-				    ],
-									}
-									]
-								};
-                // 为echarts对象加载数据
-                myChart.setOption(option);
-                //2 标段计量进度//
-                //3 标段计量分布//
-                // 基于准备好的dom,初始化echarts图表
-                var myChart = ec.init(document.getElementById('chartContainer3'));
-                var option = {
-                          color:["#e9af68","#57b7b6"],
-                          title : {
-                              text: '项目按月进度'
-                          },
-                          tooltip : {
-                              trigger: 'axis',
-                              formatter: "{b} <br/>{a}:{c} %<br/>{a1}:{c1} %"
-                          },
-                          legend: {
-                              data:['累计完成','本月完成']
-                          },
-                          toolbox: {
-                              show : true,
-                              feature : {
-                                  magicType : {show: true, type: ['line', 'bar']}
-                              }
-                          },
-    dataZoom : {
-        show : true,
-        realtime: true,
-        start : 0,
-        end : 100
-    },
-    xAxis : [
-        {
-                                  type : 'category',
-                                  boundaryGap : false,
-            data : [
-		{{projectDate}}
-            ]
-        }
-    ],
-    yAxis : [
-                              {
-                                  type : 'value',
-                                  axisLabel : {
-                                      formatter: '{value} %'
-                                  },
-                                  splitArea : {show : true}
-                              }
-                          ],
-    series : [
-                              {
-                                  name:'累计完成',
-                                  type:'line',
-                                  itemStyle: {
-                                      normal: {
-                                          lineStyle: {
-                                              shadowColor : 'rgba(0,0,0,0.4)',
-                                              shadowBlur: 5,
-                                              shadowOffsetX: 3,
-                                              shadowOffsetY: 3
-                                          }
-                                      }
-                                  },
-                                  data:[
-{{t1}}
-					    ]
-                              },
-                              {
-                                  name:'本月完成',
-                                  type:'line',
-                                  itemStyle: {
-                                      normal: {
-                                          lineStyle: {
-                                              shadowColor : 'rgba(0,0,0,0.4)',
-                                              shadowBlur: 5,
-                                              shadowOffsetX: 3,
-                                              shadowOffsetY: 3
-                                          }
-                                      }
-                                  },
-                                  data:[
-{{t2}}
-						    ]
-                              }
-                          ]
-			};
-                // 为echarts对象加载数据
-                myChart.setOption(option);
-                //3 标段计量分布//
-            }
-        );
-    </script>
-    </body>
-    <html/>
+			},
+			{
+				name: '完成进度百分比',
+				type: 'line',
+				yAxisIndex: 1,
+				data: [
+					<!-- loop conArray -->
+					{{conArray' value.pstopnow}},
+					<!-- endloop -->
+				],
+			}
+		]
+	};
+	// 为echarts对象加载数据
+	myChart2.setOption(option);
+	//2 标段计量进度//
+    //3 标段计量分布//
+    // 基于准备好的dom,初始化echarts图表
+    var myChart3 = echarts.init(document.getElementById('chartContainer3'));
+	var option = {
+		color:["#e9af68","#57b7b6"],
+		title : {
+			text: '项目按月进度'
+		},
+		tooltip : {
+			trigger: 'axis',
+			formatter: "{b} <br/>{a}:{c} %<br/>{a1}:{c1} %"
+		},
+		legend: {
+			data:['累计完成','本月完成']
+		},
+		toolbox: {
+			show : true,
+			feature : {
+				magicType : {show: true, type: ['line', 'bar']}
+			}
+		},
+		dataZoom : {
+			show : true,
+			start : 0,
+			end : 100
+		},
+    	xAxis : [
+        	{
+				type : 'category',
+				boundaryGap : true,
+            	data : [
+					{{projectDate}}
+            	]
+			}
+    	],
+    	yAxis : [
+			{
+				type : 'value',
+				axisLabel : {
+					formatter: '{value} %'
+				},
+				splitArea : {show : true}
+			}
+		],
+    	series : [
+			{
+				name:'累计完成',
+				type:'line',
+				itemStyle: {
+					normal: {
+						lineStyle: {
+							shadowColor : 'rgba(0,0,0,0.4)',
+							shadowBlur: 5,
+							shadowOffsetX: 3,
+							shadowOffsetY: 3
+						}
+					}
+				},
+				data:[
+					{{t1}}
+				]
+			},
+			{
+				name:'本月完成',
+				type:'line',
+                itemStyle: {
+                     normal: {
+                         lineStyle: {
+							 shadowColor : 'rgba(0,0,0,0.4)',
+							 shadowBlur: 5,
+                             shadowOffsetX: 3,
+                             shadowOffsetY: 3
+                         }
+                     }
+                },
+                data:[
+					{{t2}}
+				]
+			}
+		]
+	};
+	// 为echarts对象加载数据
+	myChart3.setOption(option);
+	//3 标段计量分布//
+});
+</script>
+</body>
+<html/>

File diff ditekan karena terlalu besar
+ 226 - 235
protected/view/w-project-section-detail.html


File diff ditekan karena terlalu besar
+ 211 - 7
protected/view/w-project.html


+ 31 - 0
protected/view/w-share-erro.html

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js//bootstrap.js></script>
+    <script src={{rootUrl}}global/js//jl.js></script>
+    <script src={{rootUrl}}global/js//echarts.min.js></script>
+</head>
+<body style="overflow:auto">
+<div class="wrapHeader"><h1 title="纵横计量支付" class="mainLogo"></h1></div>
+<div class="mainContent">
+    <div class="row-fluid" style="margin-top:200px">
+        <div class="span3"></div>
+        <div class="span6">
+            <div class="alert alert-block alert-error fade in">
+                <h3 class="alert-heading">分享链接未启用</h3>
+                <h5>该分享已被项目所有者关闭,暂时无法查阅,请联系相关项目所有者。</h5>
+            </div>
+        </div>
+        <div class="span3"></div>
+    </div>
+
+
+</div>
+</body>

File diff ditekan karena terlalu besar
+ 222 - 0
protected/view/w-share-project-section-detail.html


+ 208 - 0
protected/view/w-share-project-section.html

@@ -0,0 +1,208 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+    <script src={{rootUrl}}global/js/echarts.min.js></script>
+</head>
+<body style="overflow:auto">
+<div class="wrapHeader"><h1 title="纵横计量支付" class="mainLogo"></h1></div>
+<div class="mainContent">
+    <div class="row-fluid">
+        <div class="span7"><h2>{{secname}}</h2>
+            <p><span data-icon="n"></span> <a href="{{rootUrl}}share/section/{{hashcode}}">{{rootUrl}}share/section/{{hashcode}}</a>
+            </p>
+        </div>
+        <div class="span5">
+            <div class="detail">
+                <h5>总价:¥{{st.bcontracttotal}}元</h5>
+                <div class="progress">
+                    <div class="bar bar-success" style="width:{{st.progress}};" data-placement="bottom" data-toggle="tooltip"
+                         data-original-title="累计完成:¥{{st.nprogress}}">{{st.progress}}
+                    </div>
+                    <div class="bar bar-danger" style="width:{{st.otherprogress}};" data-placement="bottom" data-toggle="tooltip"
+                         data-original-title="未完成:¥{{st.notherprogress}}">{{st.otherprogress}}
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--标段信息-->
+    <ul class="nav nav-tabs">
+        <li class="active">
+            <a href="w-project-detail.html">标段信息</a>
+        </li>
+    </ul>
+    <div class="project">
+        <div class="proSection clearfix">
+            <!--图表5-->
+            <div class="fL" style="width:30%">
+                <div id="chartContainer6" style="height: 300px; width: 100%;">
+                </div>
+            </div>
+            <!--图表5-->
+            <div class="fL" style="width:70%;height:300px;overflow:hide">
+                <div id="chartContainer7" style="height: 300px; width: 100%;">
+                </div>
+            </div>
+        </div>
+        <div class="proSection clearfix">
+            <table class="table table-striped">
+                <thead>
+                <tr>
+                    <th width="15%">标段名</th>
+                    <th width="16%" class="taC">总价/期数</th>
+                    <th width="40%" class="taC">截止上期累计完成/本期完成/未完成</th>
+                </tr>
+                <!-- loop stidArray -->
+                <tr>
+                    <td width="15%"><a href="/share/section/tender/{{stidArray' value.pmid}}/{{hashcode}}" target="_blank">{{stidArray' value.pmname}}</a><br>共 {{stidArray' value.qi}} 期(本期 {{stidArray' value.statusStr}})
+                    </td>
+                    <td width="16%" class="taR">¥<b>{{stidArray' value.totalmoney}}</b><br>
+                    </td>
+                    <td width="40%" class="taR">
+                        <div class="progress">
+                            <div data-original-title="截止本期累计完成:{{stidArray' value.nTotalProgress}}" data-toggle="tooltip"
+                                 data-placement="bottom" style="width: {{stidArray' value.displayPercentSnTotalProgress}};" class="bar bar-success">{{stidArray' value.displayPercentSnTotalProgress}}
+                            </div>
+                            <div data-original-title="本期完成:{{stidArray' value.ncurrTotalProgress}}" data-toggle="tooltip" data-placement="bottom"
+                                 style="width:{{stidArray' value.displayPercentCurrTotalProgress}};" class="bar">{{stidArray' value.displayPercentCurrTotalProgress}}
+                            </div>
+                            <div data-original-title="未完成:{{stidArray' value.nlessTotalProgress}}" data-toggle="tooltip" data-placement="bottom"
+                                 style="width:{{stidArray' value.displayPercentLessTotalProgress}};" class="bar bar-gary">{{stidArray' value.displayPercentLessTotalProgress}}
+                            </div>
+                        </div>
+                    </td>
+                </tr>
+                <!-- endloop -->
+            </table>
+        </div>
+    </div>
+</div>
+
+</div>
+<script type="text/javascript">
+    //5 期数组成//
+    // 基于准备好的dom,初始化echarts图表
+    var myChart = echarts.init(document.getElementById('chartContainer6'));
+    var option = {
+        color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
+            '#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
+            '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
+            '#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
+        title: {
+            text: '',
+            x: 'left'
+        },
+        tooltip: {
+            trigger: 'item',
+            formatter: "{a} <br/>{b}:<br>{c} 元<br>占标段:{d} %"
+        },
+        calculable: true,
+        series: [
+            {
+                name: '标段计量分布',
+                type: 'pie',
+                radius: '40%',
+                center: ['50%', 155],
+                data: [
+                    <!-- loop stidArray -->
+                    {value: {{stidArray' value.contracttotal}}, name: '{{stidArray' value.pmname}}'},
+                    <!-- endloop -->
+                ]
+            }
+        ]
+    };
+    // 为echarts对象加载数据
+    myChart.setOption(option);
+    //5 期数组成//
+    //6 标段计量分布//
+    var myChart2 = echarts.init(document.getElementById('chartContainer7'));
+    var option = {
+        color: ['#ff6666', '#3cb371'],
+        title: {
+            text: '项目按月进度'
+        },
+        tooltip: {
+            trigger: 'axis',
+            formatter: "{b} <br/>{a}:{c} %<br/>{a1}:{c1} %"
+        },
+        legend: {
+            data: ['累计完成', '本月完成']
+        },
+        dataZoom: {
+            show: true,
+            start: 50,
+            end: 100
+        },
+        xAxis: [
+            {
+                type: 'category',
+                boundaryGap: true,
+                data: [
+                    {{projectDate}}
+                ]
+            }
+        ],
+        yAxis: [
+            {
+                type: 'value',
+                axisLabel: {
+                    formatter: '{value} %'
+                },
+                splitArea: {show: true},
+            }
+        ],
+        series: [
+            {
+                name: '累计完成',
+                type: 'line',
+                itemStyle: {
+                    normal: {
+                        lineStyle: {
+                            shadowColor: 'rgba(0,0,0,0.4)',
+                            shadowBlur: 5,
+                            shadowOffsetX: 3,
+                            shadowOffsetY: 3
+                        }
+                    }
+                },
+                data: [
+                    {{t1}}
+                ]
+            },
+            {
+                name: '本月完成',
+                type: 'line',
+                itemStyle: {
+                    normal: {
+                        lineStyle: {
+                            shadowColor: 'rgba(0,0,0,0.4)',
+                            shadowBlur: 5,
+                            shadowOffsetX: 3,
+                            shadowOffsetY: 3
+                        }
+                    }
+                },
+                data: [
+                    {{t2}}
+                ]
+            }
+        ]
+    };
+
+
+    // 为echarts对象加载数据
+    myChart2.setOption(option);
+    //6 标段计量分布//
+
+</script>
+
+</body>

+ 278 - 0
protected/view/w-share-project.html

@@ -0,0 +1,278 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+    <script src={{rootUrl}}global/js/echarts.min.js></script>
+</head>
+<body style="overflow:auto">
+<div class="wrapHeader"><h1 title="纵横计量支付" class="mainLogo"></h1></div>
+<div class="mainContent">
+    <div class="row-fluid">
+        <div class="span7"><h2>{{pname}}</h2>
+            <p><span data-icon="n"></span> <a href="{{rootUrl}}share/project/{{hashcode}}">{{rootUrl}}share/project/{{hashcode}}</a>
+            </p></div>
+        <div class="span5">
+            <div class="detail">
+                <h5>总价:¥{{pros.bcontracttotal}}元 (<span class="colRed">+¥{{pros.bchangTotal}}</span>)</h5>
+                <div class="progress">
+                    <div class="bar bar-success" style="width:{{pros.pcurrdone}};">{{pros.pcurrdone}}</div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--项目汇总-->
+    <ul class="nav nav-tabs">
+        <li class="active">
+            <a href="w-project-detail.html">项目汇总</a>
+        </li>
+    </ul>
+    <div class="project">
+        <div class="proSection clearfix">
+            <!--图表1-->
+            <div class="fL" style="width:39%">
+                <div id="chartContainer" style="height: 300px; width: 100%;">
+                </div>
+            </div>
+            <!--图表1-->
+            <!--图表2-->
+            <div class="fR" style="width:59%">
+                <div id="chartContainer2" style="height: 300px; width: 100%;">
+                </div>
+            </div>
+            <!--图表2-->
+        </div>
+        <div class="proSection clearfix">
+            <!--图表3-->
+            <div id="chartContainer3" style="height: 300px; width: 100%;">
+            </div>
+            <!--图表3-->
+        </div>
+    </div>
+    <!--标段列表-->
+    <ul class="nav nav-tabs">
+        <li class="active"><a>标段列表</a></li>
+    </ul>
+    {{htmlstr}}
+</div>
+<script type="text/javascript">
+    //1 标段计量分布//
+    // 基于准备好的dom,初始化echarts图表
+    var myChart = echarts.init(document.getElementById('chartContainer'));
+    var option = {
+        color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#ffa500',
+            '#d38b70', '#8fb7cf', '#cd5c5c', '#5c616b', '#40e0d0',
+            '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
+            '#6699FF', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
+        title: {
+            text: '标段计量分布',
+            x: 'left'
+        },
+        tooltip: {
+            trigger: 'item',
+            formatter: "{a} <br/>{b}:{c} <br>占总项目:{d} %"
+        },
+        legend: {
+            selectedMode: false,
+            orient: 'vertical',
+            x: 'left',
+            y: 'center',
+            data: [
+                <!-- loop conArray -->
+                '{{conArray' value.stname}}',
+                <!-- endloop -->
+            ]
+        },
+        calculable: true,
+        series: [
+            {
+                name: '标段计量分布',
+                type: 'pie',
+//                roseType: 'angle',
+                radius: '60%',
+                center: ['60%', 175],
+                data: [
+                    <!-- loop conArray -->
+                    {value: {{conArray' value.total}}, name: '{{conArray' value.stname}}'},
+                    <!-- endloop -->
+                ]
+            }
+        ]
+    };
+    // 为echarts对象加载数据
+    myChart.setOption(option);
+    //1 标段计量分布//
+    //2 标段计量进度//
+    var myChart = echarts.init(document.getElementById('chartContainer2'));
+    var option = {
+        color: ["#e9af68", "#57b7b6", "#e4575a"],
+        title: {
+            text: '标段计量进度',
+        },
+        tooltip: {
+            trigger: 'axis',
+            formatter: "{b}  <br/>{a}:{c}元 <br/>{a1}:{c1}元<br/>{a2}:{c2} %"
+        },
+        legend: {
+            data: ['总价', '累计完成计量', '完成进度百分比']
+        },
+        xAxis: [
+            {
+                type: 'category',
+                data: [
+                    <!-- loop conArray -->
+                    '{{conArray' value.stname}}',
+                    <!-- endloop -->
+                ]
+            }
+        ],
+        yAxis: [
+            {
+                type: 'value',
+                name: '金额',
+                position: 'left',
+                axisLabel: {
+                    formatter: '{value} 元'
+                },
+                splitArea: {show: true}
+            },
+            {
+                type: 'value',
+                position: 'right',
+                max: '100',
+                axisLabel: {
+                    formatter: '{value} %'
+                },
+                splitArea: {show: false},
+                splitLine: {show: false}
+            }
+        ],
+        series: [
+            {
+                name: '总价',
+                type: 'bar',
+                data: [
+                    <!-- loop conArray -->
+                    {{conArray' value.total}},
+                    <!-- endloop -->
+                ]
+            },
+            {
+                name: '累计完成计量',
+                type: 'bar',
+                data: [
+                    <!-- loop conArray -->
+                    {{conArray' value.stopnow}},
+                    <!-- endloop -->
+                ]
+            },
+            {
+                name: '完成进度百分比',
+                type: 'line',
+                yAxisIndex: 1,
+                data: [
+                    <!-- loop conArray -->
+                    {{conArray' value.pstopnow}},
+                    <!-- endloop -->
+                ]
+            }
+        ]
+    };
+    // 为echarts对象加载数据
+    myChart.setOption(option);
+    //2 标段计量进度//
+    //3 标段计量分布//
+    // 基于准备好的dom,初始化echarts图表
+    var myChart = echarts.init(document.getElementById('chartContainer3'));
+    var option = {
+        color: ["#e9af68", "#57b7b6"],
+        title: {
+            text: '项目按月进度'
+        },
+        tooltip: {
+            trigger: 'axis',
+            formatter: "{b} <br/>{a}:{c} %<br/>{a1}:{c1} %"
+        },
+        legend: {
+            data: ['累计完成', '本月完成']
+        },
+        toolbox: {
+            show: true,
+            feature: {
+                magicType: {show: true, type: ['line', 'bar']}
+            }
+        },
+        dataZoom: {
+            show: true,
+            start: 0,
+            end: 100
+        },
+        xAxis: [
+            {
+                type: 'category',
+                boundaryGap: true,
+                data: [
+                    {{projectDate}}
+                ]
+            }
+        ],
+        yAxis: [
+            {
+                type: 'value',
+                axisLabel: {
+                    formatter: '{value} %'
+                },
+                splitArea: {show: true}
+            }
+        ],
+        series: [
+            {
+                name: '累计完成',
+                type: 'line',
+                itemStyle: {
+                    normal: {
+                        lineStyle: {
+                            shadowColor: 'rgba(0,0,0,0.4)',
+                            shadowBlur: 5,
+                            shadowOffsetX: 3,
+                            shadowOffsetY: 3
+                        }
+                    }
+                },
+                data: [
+                    {{t1}}
+                ]
+            },
+            {
+                name: '本月完成',
+                type: 'line',
+                itemStyle: {
+                    normal: {
+                        lineStyle: {
+                            shadowColor: 'rgba(0,0,0,0.4)',
+                            shadowBlur: 5,
+                            shadowOffsetX: 3,
+                            shadowOffsetY: 3
+                        }
+                    }
+                },
+                data: [
+                        {{t2}}
+                        ]
+            }
+        ]
+    };
+
+
+    // 为echarts对象加载数据
+    myChart.setOption(option);
+    //3 标段计量分布//
+</script>
+</body>

+ 10 - 0
分享项目.sql

@@ -0,0 +1,10 @@
+
+CREATE TABLE IF NOT EXISTS `jl_share` (
+  `sid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `hashcode` char(255) NOT NULL,
+  `ids` int(11) NOT NULL,
+  `idtype` tinyint(3) UNSIGNED NOT NULL,
+  `intime` int(10) UNSIGNED NOT NULL,
+  `endtime` int(10) UNSIGNED NOT NULL,
+  PRIMARY KEY (`sid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;

+ 1 - 0
备注信息.sql

@@ -0,0 +1 @@
+ALTER TABLE `jl_user_profiles` ADD `remark` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '备注信息';