main.html 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910
  1. {extend name="common/base"/}
  2. {block name="style"}
  3. <link rel="stylesheet" href="{__GOUGU__}/icon-main/iconfont.css">
  4. <!--<link rel="stylesheet" href="../../../../public/static/assets/icons/main-icon/iconfont.css">-->
  5. <style type="text/css">
  6. .footer{
  7. width: 100%;
  8. height: 25px;
  9. text-align: center;
  10. margin-bottom: 0 !important;
  11. }
  12. .dashboard-num table {
  13. width: 100%;
  14. }
  15. .dashboard-num td {
  16. text-align: center;
  17. padding: 16px 0;
  18. width: 20%;
  19. border-left: 1px solid #f1f1f1;
  20. position: relative;
  21. }
  22. .dashboard-num td:nth-child(1) {
  23. border-left: none
  24. }
  25. .dashboard-num .num-title {
  26. padding-bottom: 10px;
  27. color: #999;
  28. }
  29. .dashboard-num .blue {
  30. font-size: 20px;
  31. font-weight: 300;
  32. }
  33. .dashboard-num td .badge {
  34. position: absolute;
  35. top: 0;
  36. right: 0;
  37. }
  38. .dashboard-num td .badge span {
  39. padding: 2px 4px;
  40. font-size: 12px;
  41. border-radius: 0 0 0 4px;
  42. }
  43. .dashboard-total td {
  44. border-top: 1px solid #f1f1f1
  45. }
  46. .dashboard-logs .layui-timeline-item {
  47. padding-bottom: 1px;
  48. }
  49. .info-td {
  50. width: 90px;
  51. text-align: right;
  52. background-color: #fafafa;
  53. color: #999;
  54. padding: 5px 3px;
  55. }
  56. .info-td {
  57. width: 90px;
  58. text-align: right;
  59. background-color: #fafafa;
  60. color: #999;
  61. padding: 5px 3px;
  62. }
  63. .layui-card-body .layui-timeline-title {
  64. padding-bottom: 0;
  65. font-size: 14px;
  66. }
  67. .layui-card-body .layui-timeline-item {
  68. padding-bottom: 5px;
  69. }
  70. .top-box {
  71. height: 30%;
  72. }
  73. .top-title {
  74. height: 4.5vh;
  75. font-size: 1vw;
  76. line-height: 4.5vh;
  77. color: grey;
  78. border-bottom: 1px solid rgb(221, 219, 219);
  79. }
  80. .top-box-middle {
  81. height: 16vh;
  82. /* background: url({__IMG__}/base.png) no-repeat;
  83. background-size: 70% 70%;
  84. background-position: 50% 85%; */
  85. }
  86. .top-box-bottom {
  87. height: 13.5vh;
  88. font-size: 1vw;
  89. }
  90. .top-box-bottom-1,
  91. .top-box-bottom-1 a {
  92. float: left;
  93. width: 97%;
  94. }
  95. .top-box-bottom-2,
  96. .top-box-bottom-2 a {
  97. float: left;
  98. width: 97%;
  99. }
  100. .sleep {
  101. width: 100%;
  102. height: 0.01vh;
  103. border-bottom: 1px solid rgb(221, 219, 219);
  104. float: left;
  105. /* margin-top: -1vh;
  106. left: -0.25vw; */
  107. position: relative;
  108. padding: 0;
  109. }
  110. .top-box-bottom-2 {
  111. float: left;
  112. height: 48px;
  113. }
  114. .bottom-box-left,
  115. .bottom-box-right {
  116. height: 64vh;
  117. }
  118. .heading {
  119. background-color: #f1f1f1;
  120. }
  121. .heading th {
  122. text-align: center;
  123. height: 2.5vh;
  124. }
  125. .form td {
  126. text-align: center;
  127. height: 2.5vh;
  128. }
  129. .layui-tab .layui-tab-title li {
  130. font-size: 0.7vw;
  131. }
  132. .layui-matter-item li a {
  133. display: block;
  134. padding: 12px;
  135. background-color: #f8f8f8;
  136. color: #999;
  137. border-radius: 3px;
  138. transition: all .3s;
  139. -webkit-transition: all .3s;
  140. font-size: 0.7vw;
  141. }
  142. .layui-matter-item li a:hover {
  143. background-color: #F2F8FF;
  144. }
  145. .layui-matter-item li span {
  146. float: right;
  147. }
  148. .layui-matter-item li cite {
  149. font-size: 0.7vw;
  150. font-weight: 300;
  151. color: #187FDD;
  152. }
  153. .top-head {
  154. width: 20%;
  155. }
  156. .middle-left {
  157. width: 60%;
  158. }
  159. .middle-right {
  160. width: 40%;
  161. }
  162. .top-box-middle-money {
  163. width: 100%;
  164. height: 15.2vh;
  165. line-height: 14.5vh;
  166. font-size: 2.1vw;
  167. text-align: center;
  168. }
  169. .top-box-middle-money-left {
  170. color: #1287ff;
  171. }
  172. .top-box-middle-money-right {
  173. color: #999;
  174. font-size: 0.9vw;
  175. }
  176. .top-box-middle-left {
  177. background: url({__IMG__}/main-first.png) no-repeat;
  178. background-size: 100% 85%;
  179. background-position: 85% 50%;
  180. }
  181. .top-box-middle-left-2 {
  182. background: url({__IMG__}/main-second.png) no-repeat;
  183. background-size: 85% 70%;
  184. background-position: 50% 50%;
  185. }
  186. .top-box-middle-left-3 {
  187. background: url({__IMG__}/main-third.png) no-repeat;
  188. background-size: 90% 70%;
  189. background-position: 50% 50%;
  190. }
  191. .top-box-middle-left-4 {
  192. background: url({__IMG__}/main-fourth.png) no-repeat;
  193. background-size: 80% 65%;
  194. background-position: 50% 50%;
  195. }
  196. /* 项目数量模块 */
  197. .number-box-top {
  198. width: 100%;
  199. height: 13.6vh;
  200. display: flex;
  201. justify-content: space-around;
  202. }
  203. .number-box-bottom {
  204. width: 100%;
  205. height: 13.6vh;
  206. display: flex;
  207. justify-content: space-around;
  208. }
  209. .number {
  210. width: 33%;
  211. height: 100%;
  212. border-left: 1px solid #e2e2e2;
  213. border-bottom: 1px solid #e2e2e2;
  214. }
  215. .number-1 {
  216. height: 4.55vh;
  217. text-align: center;
  218. padding-top: 2.8vh;
  219. font-size: 0.85vw;
  220. font-weight: 550;
  221. color: grey;
  222. }
  223. .number-2 {
  224. text-align: center;
  225. color: #1287ff;
  226. font-size: 1.25vw;
  227. }
  228. .ing {
  229. color: #999;
  230. font-size: 0.65vw;
  231. margin-top: -0.5vh;
  232. }
  233. .number-2 span {
  234. color: #999;
  235. font-size: 0.8vw;
  236. }
  237. .button-search {
  238. margin-left: 1vw;
  239. }
  240. #test2 {
  241. width: 100%;
  242. height: 32vh;
  243. }
  244. #test2 .layui-laydate-main {
  245. width: 100%;
  246. }
  247. #test2 .layui-laydate-content td {
  248. height: 3.645vh;
  249. }
  250. #test2 .layui-laydate-content th {
  251. width: 1%;
  252. padding: 7px 0;
  253. }
  254. .layui-laydate-content td>div{
  255. height: auto;
  256. }
  257. #test2 #layui-laydate1 .layui-laydate-header {
  258. background-color: #fff;
  259. border-bottom: 1px solid #e2e2e2;
  260. height: 4.6vh;
  261. font-size: 0.85vw;
  262. line-height: 2.5vh;
  263. }
  264. #test2 .laydate-theme-molv .layui-laydate-header i,
  265. .laydate-theme-molv .layui-laydate-header span {
  266. color: #2c2727b7;
  267. }
  268. #test2 .laydate-theme-molv .layui-laydate-header i, .laydate-theme-molv .layui-laydate-header span {
  269. color: grey !important;
  270. font-weight: 600;
  271. }
  272. #test2 .laydate-theme-molv .layui-laydate-footer {
  273. border: none;
  274. }
  275. #test2 .laydate-theme-molv .layui-laydate-content {
  276. border: none;
  277. border-top: none;
  278. border-bottom: 1px solid #e2e2e2;
  279. height: 27.2vh;
  280. }
  281. #test2 .laydate-theme-molv .layui-laydate-header i,
  282. .laydate-theme-molv .layui-laydate-header span {
  283. padding-left: 0;
  284. }
  285. .layui-laydate-content td, .layui-laydate-content th {
  286. height: 21px;
  287. }
  288. /* .layui-laydate-content td>div {
  289. height: 0.3vh;
  290. }
  291. .layui-laydate-content th {
  292. height: 0.25vh;
  293. } */
  294. .laydate-theme-molv {
  295. width: 100%;
  296. }
  297. .main-input {
  298. width: auto;
  299. }
  300. .main-input-name {
  301. display: flex;
  302. }
  303. .layui-form-label {
  304. padding: 9px 0;
  305. position: relative;
  306. display: block;
  307. text-align: left;
  308. width: 80px;
  309. font-weight: 400;
  310. line-height: 20px;
  311. }
  312. .eleven div{
  313. padding-bottom: 6px;
  314. }
  315. #test2 .layui-laydate, .layui-laydate-hint{
  316. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  317. }
  318. </style>
  319. {/block}
  320. <!-- 主体 -->
  321. {block name="body"}
  322. <div class="p-3">
  323. <div class="layui-row layui-col-space12">
  324. <div class="layui-col-md2 top-head">
  325. <div class="layui-card top-box">
  326. <div class="layui-card-header top-title"><span
  327. style="font-size: 0.85vw;font-weight: 600;">送审总额</span>
  328. </div>
  329. <div class="layui-card-body">
  330. <div class="layui-sales-info top-box-middle">
  331. <div class="top-box-middle-left" style="width: 37.5%;height: 95%;float: left;">
  332. </div>
  333. <div class="top-box-middle-right" style="width: 62.5%;height: 95%;float: left;">
  334. <div class="top-box-middle-money">
  335. <span class="top-box-middle-money-left">{$amount.sent_review_amount}</span>
  336. <span class="top-box-middle-money-right">万元</span>
  337. </div>
  338. </div>
  339. </div>
  340. <div class="layui-sales-info top-box-bt" style="height: 10.5vh;width: auto;margin-bottom: -0.8vh;">
  341. <ul class="layui-row layui-col-space12">
  342. <li class="layui-col-md12"
  343. style="height: 5.2vh;line-height: 5.2vh;font-size: 0.8vw;padding: 0;background-color: #f9faff;color: rgb(154,153,155);">
  344. &nbsp;&nbsp;&nbsp;&nbsp;预算总额&nbsp;&nbsp;&nbsp;<span
  345. style="float: right;">万元&nbsp;&nbsp;&nbsp;&nbsp;</span><span
  346. style="float: right;color: #187FDD;">{$sent_review_amount_tol.sent_review_amount_type1}&nbsp;</span>
  347. </li>
  348. <div class="sleep"></div>
  349. <li class="layui-col-md12"
  350. style="height: 5.2vh;line-height: 5.2vh;font-size: 0.8vw;padding: 0;background-color: #f9faff;color: rgb(154,153,155);">
  351. &nbsp;&nbsp;&nbsp;&nbsp;结算总额&nbsp;&nbsp;&nbsp;<span
  352. style="float: right;">万元&nbsp;&nbsp;&nbsp;&nbsp;</span><span
  353. style="float: right;color: #187FDD;">{$sent_review_amount_tol.sent_review_amount_type2}&nbsp;</span>
  354. </li>
  355. </ul>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. <div class="layui-col-md2 top-head">
  361. <div class="layui-card top-box">
  362. <div class="layui-card-header top-title"><span
  363. style="font-size: 0.85vw;font-weight: 600;">评审服务费</span>
  364. </div>
  365. <div class="layui-card-body">
  366. <div class="layui-sales-info top-box-middle">
  367. <div class="top-box-middle-left-2" style="width: 37.5%;height: 95%;float: left;">
  368. </div>
  369. <div class="top-box-middle-right" style="width: 62.5%;height: 95%;float: left;">
  370. <p class="top-box-middle-money">
  371. <span class="top-box-middle-money-left">{$amount.sent_review_cost}</span>
  372. <span class="top-box-middle-money-right">万元</span>
  373. </p>
  374. </div>
  375. </div>
  376. <div class="layui-sales-info top-box-bt" style="height: 10.5vh;width: auto;margin-bottom: -0.8vh;">
  377. <ul class="layui-row layui-col-space12">
  378. <li class="layui-col-md12"
  379. style="height: 5.2vh;line-height: 5.2vh;font-size: 0.8vw;padding: 0;background-color: #f9faff;color: rgb(154,153,155);">
  380. &nbsp;&nbsp;&nbsp;&nbsp;<span id="time1"></span>年上半年服务费用&nbsp;&nbsp;&nbsp;<span
  381. style="float: right;">万元&nbsp;&nbsp;&nbsp;&nbsp;</span><span
  382. style="float: right;color: #187FDD;">{$sent_review_cost.first_sent_review_cost}&nbsp;</span>
  383. </li>
  384. <div class="sleep"></div>
  385. <li class="layui-col-md12"
  386. style="height: 5.2vh;line-height: 5.2vh;font-size: 0.8vw;padding: 0;background-color: #f9faff;color: rgb(154,153,155);">
  387. &nbsp;&nbsp;&nbsp;&nbsp;<span id="time2"></span>年下半年服务费用&nbsp;&nbsp;&nbsp;<span
  388. style="float: right;">万元&nbsp;&nbsp;&nbsp;&nbsp;</span><span
  389. style="float: right;color: #187FDD;">{$sent_review_cost.second_sent_review_cost}&nbsp;</span>
  390. </li>
  391. </ul>
  392. </div>
  393. </div>
  394. </div>
  395. </div>
  396. <div class="layui-col-md2 top-head">
  397. <div class="layui-card top-box">
  398. <div class="layui-card-header top-title"><span
  399. style="font-size: 0.85vw;font-weight: 600;">总审增减率</span>
  400. </div>
  401. <div class="layui-card-body">
  402. <div class="layui-sales-info top-box-middle">
  403. <div class="top-box-middle-left-3" style="width: 37.5%;height: 95%;float: left;">
  404. </div>
  405. <div class="top-box-middle-right" style="width: 62.5%;height: 95%;float: left;">
  406. <p class="top-box-middle-money">
  407. <span class="top-box-middle-money-left">{$amount.review_add_reduce_rate}</span>
  408. <span class="top-box-middle-money-right">%</span>
  409. </p>
  410. </div>
  411. </div>
  412. <div class="layui-sales-info top-box-bt" style="height: 10.5vh;width: auto;margin-bottom: -0.8vh;">
  413. <ul class="layui-row layui-col-space12">
  414. <li class="layui-col-md12"
  415. style="height: 5.2vh;line-height: 5.2vh;font-size: 0.8vw;padding: 0;background-color: #f9faff;color: rgb(154,153,155);">
  416. &nbsp;&nbsp;&nbsp;&nbsp;预算核增减率&nbsp;&nbsp;&nbsp;<span
  417. style="float: right;">%&nbsp;&nbsp;&nbsp;&nbsp;</span><span
  418. style="float: right;color: #187FDD;">{$sent_review_amount_tol.review_add_reduce_rate_type1}&nbsp;</span>
  419. </li>
  420. <div class="sleep"></div>
  421. <li class="layui-col-md12"
  422. style="height: 5.2vh;line-height: 5.2vh;font-size: 0.8vw;padding: 0;background-color: #f9faff;color: rgb(154,153,155);">
  423. &nbsp;&nbsp;&nbsp;&nbsp;结算核增减率&nbsp;&nbsp;&nbsp;<span
  424. style="float: right;">%&nbsp;&nbsp;&nbsp;&nbsp;</span><span
  425. style="float: right;color: #187FDD;">{$sent_review_amount_tol.review_add_reduce_rate_type2}&nbsp;</span>
  426. </li>
  427. </ul>
  428. </div>
  429. </div>
  430. </div>
  431. </div>
  432. <div class="layui-col-md2 top-head">
  433. <div class="layui-card top-box">
  434. <div class="layui-card-header top-title"><span
  435. style="font-size: 0.85vw;font-weight: 600;">项目数量</span>
  436. </div>
  437. <div class="layui-card-body" style="padding: 0;">
  438. <div class="number-box-top">
  439. <div class="number" style="border-left:none">
  440. <div class="number-1"><i class="iconfont" style="color: rgb(83,150,255);">&#xe67e; </i>项目总数
  441. </div>
  442. <div class="number-2">{$num_project.num} <span>个</span></div>
  443. </div>
  444. <div class="number">
  445. <div class="number-1">
  446. <i class="iconfont" style="color: rgb(242,173,76);">&#xe6eb; </i>
  447. 预算项目
  448. <div class="ing">(进行中)</div>
  449. </div>
  450. <div class="number-2">{$num_project.yu} <span>个</span></div>
  451. </div>
  452. <div class="number">
  453. <div class="number-1">
  454. <i class="iconfont" style="color: rgb(38,131,245);">&#xe75e; </i>
  455. 结算项目
  456. <div class="ing">(进行中)</div>
  457. </div>
  458. <div class="number-2">{$num_project.jie} <span>个</span></div>
  459. </div>
  460. </div>
  461. <div class="number-box-bottom">
  462. <div class="number" style="border-left:none;border-bottom: none;">
  463. <div class="number-1"><i class="iconfont" style="color: rgb(81,161,255);">&#xe504; </i>作业中
  464. </div>
  465. <div class="number-2">{$num_project.zuo} <span>个</span></div>
  466. </div>
  467. <div class="number" style="border-bottom: none;">
  468. <div class="number-1"><i class="iconfont" style="color: rgb(0,221,3);">&#xe622; </i>已归档
  469. </div>
  470. <div class="number-2">{$num_project.gui} <span>个</span></div>
  471. </div>
  472. <div class="number" style="border-bottom: none;">
  473. <div class="number-1"><i class="iconfont" style="color: rgb(232,82,74);">&#xe6b8;</i>已退审
  474. </div>
  475. <div class="number-2">{$num_project.tui} <span>个</span></div>
  476. </div>
  477. </div>
  478. </div>
  479. </div>
  480. </div>
  481. <div class="layui-col-md2 top-head">
  482. <div id="test2" style="width: 100%;height: 32vh;"></div>
  483. </div>
  484. </div>
  485. <div class="layui-row layui-col-space12">
  486. {if $home_five.audit_project == 1}
  487. <div class="layui-col-md5 middle-left">
  488. <div class="layui-card">
  489. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  490. <div class="layui-tab layui-tab-brief" style="height: 88%;">
  491. <ul class="layui-tab-title" style="font-size: 1vw; font-weight: 600;">
  492. <li class="layui-this" style="font-size: 0.95vw;">
  493. 待审核任务
  494. </li>
  495. </ul>
  496. <div class="layui-tab-content" style="height: 100%; overflow: scroll;">
  497. <table class="layui-hide" id="cost_project" lay-filter="cost_project"></table>
  498. </div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. {/if}
  504. {if $home_five.imminent_project == 1 || $home_five.overdue_item == 1}
  505. <div class="layui-col-md4 middle-right">
  506. <div class="layui-card">
  507. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  508. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"
  509. style="height: 63.75vh; /* 容器高度 */overflow: hidden;">
  510. <ul class="layui-tab-title" style="font-size: 1vw; font-weight: 600;color: grey;">
  511. {if $home_five.imminent_project == 1}
  512. <li class="layui-this" style="font-size: 0.95vw;">
  513. 临期项目
  514. </li>
  515. {/if}
  516. {if $home_five.overdue_item == 1}
  517. <li style="font-size: 0.95vw;">
  518. 逾期项目
  519. </li>
  520. {/if}
  521. </ul>
  522. <div class="layui-tab-content" style="height: 100%; overflow: scroll;">
  523. {if $home_five.imminent_project == 1}
  524. <div class="layui-tab-item layui-show">
  525. <table class="layui-hide" id="advent_project" lay-filter="advent_project"></table>
  526. </div>
  527. {/if}
  528. {if $home_five.overdue_item == 1}
  529. <div class="layui-tab-item">
  530. <table class="layui-hide" id="late_project" lay-filter="late_project"></table>
  531. </div>
  532. {/if}
  533. <div class="layui-tab-item"></div>
  534. </div>
  535. </div>
  536. </div>
  537. </div>
  538. </div>
  539. {/if}
  540. {if $home_five.list_project == 1}
  541. <div class="layui-col-md3 middle-left">
  542. <div class="layui-card">
  543. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  544. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="height: 88%;">
  545. <div class="layui-card-header top-title" style="font-size: 0.95vw;font-weight: 600;">
  546. 项目列表
  547. </div>
  548. <div class="layui-tab-content" style="height: 100%; overflow: scroll;padding: 0 0 10px 0;">
  549. <form id="projectForm" class="layui-form" lay-filter="barsearchform">
  550. <div class="layui-card-body layui-col-space11 eleven">
  551. <div class="layui-col-md3 main-input-name" style="width: 40%;">
  552. <label class="layui-form-label">
  553. 项目名称:
  554. </label>
  555. <div class="layui-input-block">
  556. <input type="text" name="project_name" placeholder="请输入项目名称" autocomplete="off"
  557. class="layui-input main-input">
  558. </div>
  559. </div>
  560. <div class="layui-col-md3 main-input-name" style="width: 35%;">
  561. <label class="layui-form-label" style="text-align: center;">
  562. 负责人:
  563. </label>
  564. <div class="layui-input-block">
  565. <input type="text" name="review_head_name" placeholder="请输入负责人" autocomplete="off"
  566. class="layui-input main-input">
  567. </div>
  568. </div>
  569. <div class="layui-col-md3 main-input-name">
  570. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="project-search"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  571. <button type="reset" class="layui-btn layui-btn-primary swiper-right-form-reset" lay-submit="" lay-filter="reset">重置</button>
  572. </div>
  573. </div>
  574. </form>
  575. <div class="layui-tab-item layui-show">
  576. <table class="layui-hide" id="cost_project2" lay-filter="cost_project2"></table>
  577. </div>
  578. </div>
  579. </div>
  580. </div>
  581. </div>
  582. </div>
  583. {/if}
  584. {if $home_five.address_book == 1}
  585. <div class="layui-col-md3 middle-right">
  586. <div class="layui-card">
  587. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  588. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  589. <!-- <div class="layui-card-header top-title" style="font-size: 0.95vw;font-weight: 600;">
  590. 通讯录
  591. </div> -->
  592. <ul class="layui-tab-title"
  593. style="font-size: 1vw; font-weight: 600;color: grey;display: flex;justify-content: flex-end;align-items: center;">
  594. <div style="left: 2%;position: absolute;">通讯录</div>
  595. <li class="layui-this" style="font-size: 0.95vw;">
  596. 内部
  597. </li>
  598. <li style="font-size: 0.95vw;">
  599. 外部
  600. </li>
  601. </ul>
  602. <div class="layui-tab-content" style="height: 100%; overflow: scroll;padding: 0 0 10px 0;">
  603. <div class="layui-tab-item layui-show">
  604. <form id="peopleForm" class="layui-form" lay-filter="barsearchform">
  605. <div class="layui-card-body layui-col-space11 eleven">
  606. <div class="layui-col-md5 main-input-name" style="width: 65%;">
  607. <label class="layui-form-label" style="width: 7vw;">
  608. 联系人姓名:
  609. </label>
  610. <div class="layui-input-block">
  611. <input type="text" name="nickname" placeholder="请输入联系人姓名" autocomplete="off" class="layui-input main-input">
  612. </div>
  613. </div>
  614. <div class="layui-col-md2 main-input-name">
  615. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  616. <button type="reset" class="layui-btn layui-btn-primary swiper-right-form-reset" lay-submit="" lay-filter="reset">重置</button>
  617. </div>
  618. </div>
  619. </form>
  620. <table class="layui-hide" id="people" lay-filter="people"></table>
  621. </div>
  622. <div class="layui-tab-item">
  623. <form id="peopleForm2" class="layui-form" lay-filter="barsearchform">
  624. <div class="layui-card-body layui-col-space11 eleven">
  625. <div class="layui-col-md5 main-input-name" style="width: 65%;">
  626. <label class="layui-form-label" style="width: 7vw;">
  627. 联系人/单位名称:
  628. </label>
  629. <div class="layui-input-block">
  630. <input type="text" name="nickname2" placeholder="请输入联系人/单位名称" autocomplete="off" class="layui-input main-input">
  631. </div>
  632. </div>
  633. <div class="layui-col-md2 main-input-name">
  634. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform2"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  635. <button type="reset" class="layui-btn layui-btn-primary swiper-right-form-reset" lay-submit="" lay-filter="reset">重置</button>
  636. </div>
  637. </div>
  638. </form>
  639. <table class="layui-hide" id="head" lay-filter="head"></table>
  640. </div>
  641. </div>
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. {/if}
  647. </div>
  648. </div>
  649. <div class="layui-col-md4">
  650. </div>
  651. {/block}
  652. <!-- /主体 -->
  653. <!-- 脚本 -->
  654. {block name="script"}
  655. <script src="https://cdn.staticfile.org/echarts/5.3.0/echarts.min.js"></script>
  656. <script>
  657. const moduleInit = ['tool'];
  658. function gouguInit() {
  659. var table = layui.table,
  660. tool = layui.tool,
  661. form = layui.form;
  662. var allcount;
  663. //审核表格
  664. layui.pageTable = table.render({
  665. elem: '#cost_project',
  666. title: '待审核任务',
  667. // toolbar: '#toolbarDemo',
  668. url: '/admin/project.audit/list',
  669. page: false,
  670. limit: 20,
  671. cellMinWidth: 80,
  672. parseData: function(res) { // 数据解析回调函数
  673. // 在这里可以获取数据总数
  674. allcount = res.count;
  675. return {
  676. code: res.code, // 数据状态码
  677. msg: res.msg, // 状态信息
  678. count: res.count, // 数据总数
  679. data: res.data // 当前页数据
  680. };
  681. },
  682. cols: [
  683. [
  684. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  685. templet: function(d){
  686. return allcount - (d.LAY_NUM-1);
  687. }
  688. }, {
  689. field: 'project_status',
  690. title: '项目状态',
  691. align: 'center',
  692. width: 100,
  693. templet: function (item) {
  694. var html = '';
  695. if (item.project_status === 2) {
  696. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  697. } else if (item.project_status === 6) {
  698. html = '<span class="layui-badge layui-bg-blue">归档中</span> ';
  699. } else if (item.project_status === 7) {
  700. html = '<span class="layui-badge layui-bg-blue">退审中</span> ';
  701. } else if (item.project_status === 5) {
  702. html = '<span class="layui-badge layui-bg-blue">作业中</span> ';
  703. }
  704. return html;
  705. }
  706. }, {
  707. field: 'audit_status',
  708. title: '审批状态',
  709. align: 'center',
  710. width: 100,
  711. templet: function (item) {
  712. var html = '';
  713. if (item.audit_status === 1) {
  714. html = '<span class="layui-badge layui-bg-blue">待审核</span> ';
  715. } else if (item.audit_status === 2) {
  716. html = '<span class="layui-badge layui-bg-green">已通过</span> ';
  717. } else if (item.audit_status === 3) {
  718. html = '<span class="layui-badge layui-bg-red">已拒绝</span> ';
  719. }
  720. return html;
  721. }
  722. }, {
  723. field: 'project_name',
  724. title: '项目名称',
  725. align: 'center',
  726. width: 400
  727. }, {
  728. field: 'project_type',
  729. title: '项目类型',
  730. align: 'center',
  731. width: 100
  732. }, {
  733. field: 'audit_name',
  734. title: '流程名称',
  735. align: 'center',
  736. width: 150
  737. }, {
  738. field: 'sponsor',
  739. title: '发起人',
  740. align: 'center',
  741. width: 150
  742. }, {
  743. field: 'sponsor_unit',
  744. title: '发起单位/部门',
  745. align: 'center',
  746. width: 200
  747. }, {
  748. field: 'create_time',
  749. title: '发起时间',
  750. align: 'center',
  751. width: 150
  752. }, {
  753. field: 'approver_name',
  754. title: '审批人',
  755. align: 'center',
  756. width: 150
  757. }, {
  758. field: 'update_time',
  759. title: '审批时间',
  760. align: 'center',
  761. width: 150
  762. }, {
  763. field: 'remark',
  764. title: '审批原因',
  765. align: 'center',
  766. width: 150
  767. }, {
  768. fixed: 'right',
  769. field: 'right',
  770. title: '操作',
  771. width: 136,
  772. align: 'center',
  773. templet: function (item) {
  774. var h = '';
  775. if (item.audit_status === 1) {
  776. h = '<div class="layui-btn-group"> <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a> <a class="layui-btn layui-btn-xs" lay-event="edit">通过</a> <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="overrule">拒绝</a> </div>'
  777. } else {
  778. h = '<div class="layui-btn-group"> <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a></div>'
  779. }
  780. return h;
  781. }
  782. }]
  783. ]
  784. });
  785. var abc = 0;
  786. ////审核表格 监听表格行工具事件
  787. table.on('tool(cost_project)', function (obj) {
  788. var data = obj.data;
  789. if (obj.event === 'read') {
  790. if (data.audit_type == 1) {
  791. tool.side('/admin/project.audit/read?id=' + data.project_id);
  792. } else if (data.audit_type == 2) {
  793. tool.side('/admin/project.report/view?id=' + data.else_id);
  794. } else if (data.audit_type == 3) {
  795. tool.side(' /admin/project.contact/view?id=' + data.else_id);
  796. }else {
  797. layer.msg("审核内容不存在!")
  798. }
  799. // console.log(obj.data.getTrusteeName.institution)
  800. tool.side('/admin/project.audit/read?id=' + obj.data.project_id);
  801. } else if (obj.event === 'edit') {
  802. layer.confirm("确认是否审批通过?", function (index) {
  803. console.log(data)
  804. if (abc == 0) {
  805. let callback = function (e) {
  806. abc = 0
  807. layer.msg(e.msg);
  808. setTimeout(function () {
  809. window.location.reload()
  810. layer.close(index);
  811. }, 1000)
  812. }
  813. if (data.audit_type == 1) {
  814. if (data.project_status == 2) {
  815. //立项审批
  816. tool.post("/admin/project.audit/project_edit_first", {
  817. id: data.id,
  818. else_id: data.else_id,
  819. audit_type: data.audit_type,
  820. project_id: data.project_id,
  821. project_status: data.project_status,
  822. }, callback);
  823. } else if (data.project_status == 6) {
  824. tool.post("/admin/project.audit/project_edit_second", {
  825. id: data.id,
  826. else_id: data.else_id,
  827. audit_type: data.audit_type,
  828. project_id: data.project_id,
  829. project_status: data.project_status,
  830. }, callback);
  831. } else if (data.project_status == 7) {
  832. //退审审批
  833. tool.post("/admin/project.audit/project_edit_third", {
  834. id: data.id,
  835. else_id: data.else_id,
  836. audit_type: data.audit_type,
  837. project_id: data.project_id,
  838. project_status: data.project_status,
  839. }, callback);
  840. }
  841. } else if (data.audit_type == 2) {
  842. if (data.else_status == 0) {
  843. //报告新建
  844. console.log(1)
  845. tool.post("/admin/project.report/agree_report", {
  846. id: data.id,
  847. else_id: data.else_id,
  848. audit_type: data.audit_type,
  849. project_id: data.project_id,
  850. project_status: data.project_status,
  851. type: 1000,
  852. }, callback);
  853. } else if (data.else_status == 3) {
  854. //报告删除
  855. tool.post("/admin/project.report/agree_delete", {
  856. id: data.id,
  857. else_id: data.else_id,
  858. audit_type: data.audit_type,
  859. project_id: data.project_id,
  860. project_status: data.project_status,
  861. type: 1000,
  862. }, callback);
  863. }
  864. } else if (data.audit_type == 3) {
  865. if (data.else_status == 0) {
  866. //联系函新建
  867. tool.post("/admin/project.contact/agree_contact", {
  868. id: data.id,
  869. else_id: data.else_id,
  870. audit_type: data.audit_type,
  871. project_id: data.project_id,
  872. project_status: data.project_status,
  873. type: 1000,
  874. }, callback);
  875. } else if (data.else_status == 3) {
  876. //联系函删除
  877. tool.post("/admin/project.contact/agree_delete", {
  878. id: data.id,
  879. else_id: data.else_id,
  880. audit_type: data.audit_type,
  881. project_id: data.project_id,
  882. project_status: data.project_status,
  883. type: 1000,
  884. }, callback);
  885. }
  886. }else{
  887. layer.msg("请联系管理员")
  888. }
  889. // console.log(abc, data.else_status)
  890. abc = 1;
  891. }
  892. }, function () {
  893. abc = 0;
  894. })
  895. } else if (obj.event === 'overrule') {
  896. layer.prompt({
  897. title: '请输入<span style="color: red">拒绝</span>原因',
  898. formType: 2,
  899. area: ['35vw', '15vw']
  900. }, function (text, index) {
  901. if (text == '') {
  902. layer.msg('请先完善拒绝原因');
  903. return false;
  904. } else {
  905. let callback = function (e) {
  906. layer.msg(e.msg);
  907. listount--;
  908. if (listount == 0) {
  909. parent.showhongdian()
  910. }
  911. setTimeout(function () {
  912. window.location.reload()
  913. layer.close(index);
  914. }, 2000)
  915. }
  916. if (data.audit_type == 1) {
  917. if (data.project_status == 2) {
  918. //立项
  919. tool.post("/admin/project.audit/project_overrule_first", {
  920. id: data.id,
  921. else_id: data.else_id,
  922. audit_type: data.audit_type,
  923. project_id: data.project_id,
  924. project_status: data.project_status,
  925. audit_remark: text,
  926. }, callback);
  927. } else if (data.project_status == 6) {
  928. //归档
  929. tool.post("/admin/project.audit/project_overrule_second", {
  930. id: data.id,
  931. else_id: data.else_id,
  932. audit_type: data.audit_type,
  933. project_id: data.project_id,
  934. project_status: data.project_status,
  935. audit_remark: text,
  936. }, callback);
  937. } else if (data.project_status == 7) {
  938. //退审
  939. tool.post("/admin/project.audit/project_overrule_third", {
  940. id: data.id,
  941. else_id: data.else_id,
  942. audit_type: data.audit_type,
  943. project_id: data.project_id,
  944. project_status: data.project_status,
  945. audit_remark: text,
  946. }, callback);
  947. }
  948. } else if (data.audit_type == 2) {
  949. if (data.else_status == 0) {
  950. //报告新建
  951. tool.post("/admin/project.report/un_report", {
  952. id: data.id,
  953. else_id: data.else_id,
  954. audit_type: data.audit_type,
  955. project_id: data.project_id,
  956. project_status: data.project_status,
  957. audit_remark: text,
  958. type: 1000,
  959. }, callback);
  960. } else if (data.else_status == 3) {
  961. //报告删除
  962. tool.post("/admin/project.report/un_delete", {
  963. id: data.id,
  964. else_id: data.else_id,
  965. audit_type: data.audit_type,
  966. project_id: data.project_id,
  967. project_status: data.project_status,
  968. audit_remark: text,
  969. type: 1000,
  970. }, callback);
  971. }
  972. } else if (data.audit_type == 3) {
  973. if (data.else_status == 0) {
  974. //联系函新建
  975. tool.post("/admin/project.contact/un_contact", {
  976. id: data.id,
  977. else_id: data.else_id,
  978. audit_type: data.audit_type,
  979. project_id: data.project_id,
  980. project_status: data.project_status,
  981. audit_remark: text,
  982. type: 1000,
  983. }, callback);
  984. } else if (data.else_status == 3) {
  985. //联系函删除
  986. tool.post("/admin/project.contact/un_delete", {
  987. id: data.id,
  988. else_id: data.else_id,
  989. audit_type: data.audit_type,
  990. project_id: data.project_id,
  991. project_status: data.project_status,
  992. audit_remark: text,
  993. type: 1000,
  994. }, callback);
  995. }
  996. }
  997. else{
  998. layer.msg("请联系管理员")
  999. }
  1000. }
  1001. })
  1002. }
  1003. return false;
  1004. });
  1005. //临期表格
  1006. layui.pageTable = table.render({
  1007. elem: '#advent_project',
  1008. title: '临期项目',
  1009. url: '/admin/project.cost/list',
  1010. page: false,
  1011. limit: 20,
  1012. cellMinWidth: 80,
  1013. parseData: function(res) { // 数据解析回调函数
  1014. // 在这里可以获取数据总数
  1015. allcount = res.count;
  1016. return {
  1017. code: res.code, // 数据状态码
  1018. msg: res.msg, // 状态信息
  1019. count: res.count, // 数据总数
  1020. data: res.data // 当前页数据
  1021. };
  1022. },
  1023. cols: [
  1024. [
  1025. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1026. templet: function(d){
  1027. return allcount - (d.LAY_NUM-1);
  1028. }
  1029. }, {
  1030. field: 'project_status',
  1031. title: '项目状态',
  1032. align: 'center',
  1033. width: 100,
  1034. templet: function (item) {
  1035. var html = '';
  1036. if (item.project_status === 1) {
  1037. html = '<span class="layui-badge layui-bg-orange">立项中</span> ';
  1038. } else if (item.project_status === 2) {
  1039. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  1040. } else if (item.project_status === -1) {
  1041. html = '<span class="layui-badge layui-bg-red">待修改</span> ';
  1042. } else if (item.project_status === 3) {
  1043. html = '<span class="layui-badge layui-bg-green">待接收</span> ';
  1044. } else if (item.project_status === 4) {
  1045. html =
  1046. '<span class="layui-badge" style="background-color: #31bdec">分配中</span> ';
  1047. } else if (item.project_status === 5) {
  1048. html =
  1049. '<span class="layui-badge" style="background-color: #31bdec">作业中</span> ';
  1050. } else if (item.project_status === 6) {
  1051. html =
  1052. '<span class="layui-badge" style="background-color: #31bdec">归档中</span> ';
  1053. } else if (item.project_status === 7) {
  1054. html =
  1055. '<span class="layui-badge" style="background-color: #31bdec">退审中</span> ';
  1056. } else if (item.project_status === 8) {
  1057. html =
  1058. '<span class="layui-badge" style="background-color: #31bdec">已归档</span> ';
  1059. } else if (item.project_status === 9) {
  1060. html =
  1061. '<span class="layui-badge" style="background-color: #31bdec">已退审</span> ';
  1062. }
  1063. return html;
  1064. }
  1065. }, {
  1066. field: 'project_name',
  1067. title: '项目名称',
  1068. align: 'center',
  1069. }, {
  1070. field: 'project_num',
  1071. title: '项目编号',
  1072. align: 'center',
  1073. }, {
  1074. field: 'project_time',
  1075. title: '剩余时间',
  1076. align: 'center',
  1077. width: 100,
  1078. templet: function (item) {
  1079. let outcome = Math.round(new Date().getTime() / 1000).toString();
  1080. var advent_time = item.project_end_time - outcome
  1081. // console.log(advent_time);
  1082. function getDuration(second) {
  1083. var duration
  1084. var days = Math.floor(second / 86400);
  1085. var hours = Math.floor((second % 86400) / 3600);
  1086. var minutes = Math.floor(((second % 86400) % 3600) / 60);
  1087. var seconds = Math.floor(((second % 86400) % 3600) % 60);
  1088. if (days > 0) duration = days + "天";
  1089. else if (hours > 0) duration = hours + "小时";
  1090. else if (minutes > 0) duration = minutes + "分";
  1091. else if (seconds > 0) duration = seconds + "秒";
  1092. return duration;
  1093. }
  1094. return getDuration(advent_time);
  1095. }
  1096. },
  1097. {
  1098. fixed: 'right',
  1099. field: 'right',
  1100. title: '操作',
  1101. width: 136,
  1102. align: 'center',
  1103. templet: function (a) {
  1104. var h = '';
  1105. var arr = [3, 4, 5];
  1106. if (a.self_id == a.entrust_maker) {
  1107. if (a.project_status == 1) {
  1108. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1109. } else if (arr.indexOf(a.project_status) !== -1) {
  1110. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1111. } else {
  1112. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1113. }
  1114. } else {
  1115. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1116. }
  1117. return h;
  1118. }
  1119. }
  1120. ]
  1121. ]
  1122. });
  1123. //临期表格监听表格行工具事件
  1124. table.on('tool(advent_project)', function (obj) {
  1125. var data = obj.data;
  1126. if (obj.event === 'read') {
  1127. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1128. } else if (obj.event === 'edit') {
  1129. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1130. } else if (obj.event === 'del') {
  1131. layer.confirm('确定要删除该记录吗?', {
  1132. icon: 3,
  1133. title: '提示'
  1134. }, function (index) {
  1135. if (data.project_status < 3) {
  1136. let callback = function (e) {
  1137. layer.msg(e.msg);
  1138. if (e.code == 0) {
  1139. obj.del();
  1140. }
  1141. }
  1142. tool.delete("/admin/project.cost/del", {
  1143. id: data.id
  1144. }, callback);
  1145. layer.close(index);
  1146. }
  1147. layer.msg("已审核,无法删除");
  1148. });
  1149. }
  1150. return false;
  1151. });
  1152. //逾期表格
  1153. layui.pageTable = table.render({
  1154. elem: '#late_project',
  1155. title: '逾期项目',
  1156. url: '/admin/project.cost/list2',
  1157. page: false,
  1158. limit: 20,
  1159. cellMinWidth: 80,
  1160. parseData: function(res) { // 数据解析回调函数
  1161. // 在这里可以获取数据总数
  1162. allcount = res.count;
  1163. return {
  1164. code: res.code, // 数据状态码
  1165. msg: res.msg, // 状态信息
  1166. count: res.count, // 数据总数
  1167. data: res.data // 当前页数据
  1168. };
  1169. },
  1170. cols: [
  1171. [
  1172. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1173. templet: function(d){
  1174. return allcount - (d.LAY_NUM-1);
  1175. }
  1176. }, {
  1177. field: 'project_status',
  1178. title: '项目状态',
  1179. align: 'center',
  1180. width: 100,
  1181. templet: function (item) {
  1182. var html = '';
  1183. if (item.project_status === 1) {
  1184. html = '<span class="layui-badge layui-bg-orange">立项中</span> ';
  1185. } else if (item.project_status === 2) {
  1186. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  1187. } else if (item.project_status === -1) {
  1188. html = '<span class="layui-badge layui-bg-red">待修改</span> ';
  1189. } else if (item.project_status === 3) {
  1190. html = '<span class="layui-badge layui-bg-green">待接收</span> ';
  1191. } else if (item.project_status === 4) {
  1192. html =
  1193. '<span class="layui-badge" style="background-color: #31bdec">分配中</span> ';
  1194. } else if (item.project_status === 5) {
  1195. html =
  1196. '<span class="layui-badge" style="background-color: #31bdec">作业中</span> ';
  1197. } else if (item.project_status === 6) {
  1198. html =
  1199. '<span class="layui-badge" style="background-color: #31bdec">归档中</span> ';
  1200. } else if (item.project_status === 7) {
  1201. html =
  1202. '<span class="layui-badge" style="background-color: #31bdec">退审中</span> ';
  1203. } else if (item.project_status === 8) {
  1204. html =
  1205. '<span class="layui-badge" style="background-color: #31bdec">已归档</span> ';
  1206. } else if (item.project_status === 9) {
  1207. html =
  1208. '<span class="layui-badge" style="background-color: #31bdec">已退审</span> ';
  1209. }
  1210. return html;
  1211. }
  1212. }, {
  1213. field: 'project_name',
  1214. title: '项目名称',
  1215. align: 'center',
  1216. }, {
  1217. field: 'project_num',
  1218. title: '项目编号',
  1219. align: 'center',
  1220. }, {
  1221. field: 'project_time',
  1222. title: '逾期时间',
  1223. align: 'center',
  1224. width: 100,
  1225. templet: function (item) {
  1226. let outcome = Math.round(new Date().getTime() / 1000).toString();
  1227. var advent_time = item.project_end_time - outcome
  1228. var time = getDuration(advent_time);
  1229. var timestr = "<span style='color: green'>" + "剩余" + time + "</span>";
  1230. if (advent_time < 0) {
  1231. advent_time = -advent_time;
  1232. time = getDuration(advent_time);
  1233. timestr = "<span style='color: red'>" + "逾期" + time + "</span>";
  1234. }
  1235. var html;
  1236. html =
  1237. "<div>" + timestr + "</div>";
  1238. function getDuration(second) {
  1239. var duration
  1240. var days = Math.floor(second / 86400);
  1241. var hours = Math.floor((second % 86400) / 3600);
  1242. if (days > 0) duration = days + "天";
  1243. else if (hours > 0) duration = "不足一天";
  1244. else if (hours == 0) duration = "不足一天";
  1245. return duration;
  1246. }
  1247. return html;
  1248. }
  1249. },
  1250. {
  1251. fixed: 'right',
  1252. field: 'right',
  1253. title: '操作',
  1254. width: 136,
  1255. align: 'center',
  1256. templet: function (a) {
  1257. var h = '';
  1258. var arr = [3, 4, 5];
  1259. if (a.self_id == a.entrust_maker) {
  1260. if (a.project_status == 1) {
  1261. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1262. } else if (arr.indexOf(a.project_status) !== -1) {
  1263. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1264. } else {
  1265. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1266. }
  1267. } else {
  1268. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1269. }
  1270. return h;
  1271. }
  1272. }
  1273. ]
  1274. ]
  1275. });
  1276. //逾期表格
  1277. table.on('tool(late_project)', function (obj) {
  1278. var data = obj.data;
  1279. if (obj.event === 'read') {
  1280. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1281. } else if (obj.event === 'edit') {
  1282. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1283. } else if (obj.event === 'del') {
  1284. layer.confirm('确定要删除该记录吗?', {
  1285. icon: 3,
  1286. title: '提示'
  1287. }, function (index) {
  1288. if (data.project_status < 3) {
  1289. let callback = function (e) {
  1290. layer.msg(e.msg);
  1291. if (e.code == 0) {
  1292. obj.del();
  1293. }
  1294. }
  1295. tool.delete("/admin/project.cost/del", {
  1296. id: data.id
  1297. }, callback);
  1298. layer.close(index);
  1299. }
  1300. layer.msg("已审核,无法删除");
  1301. });
  1302. }
  1303. return false;
  1304. });
  1305. layui.project2Table = table.render({
  1306. elem: '#cost_project2',
  1307. title: '造价项目列表',
  1308. //toolbar: '#toolbarDemo',
  1309. url: '/admin/project.cost/datalist',
  1310. limit: 20,
  1311. parseData: function(res) { // 数据解析回调函数
  1312. // 在这里可以获取数据总数
  1313. allcount = res.count;
  1314. return {
  1315. code: res.code, // 数据状态码
  1316. msg: res.msg, // 状态信息
  1317. count: res.count, // 数据总数
  1318. data: res.data // 当前页数据
  1319. };
  1320. },
  1321. cols: [
  1322. [
  1323. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1324. templet: function(d){
  1325. return allcount - (d.LAY_NUM-1);
  1326. }
  1327. },
  1328. {
  1329. field: 'project_status',
  1330. title: '项目状态',
  1331. align: 'center',
  1332. width: 100,
  1333. templet: function (item) {
  1334. var html = '';
  1335. if (item.project_status === 1) {
  1336. html = '<span class="layui-badge layui-bg-orange" style="background-color: #ffb800">立项中</span> ';
  1337. } else if (item.project_status === 2) {
  1338. html = '<span class="layui-badge layui-bg-blue" style="background-color: #b30095">审批中</span> ';
  1339. } else if (item.project_status === -1) {
  1340. html = '<span class="layui-badge layui-bg-red" style="background-color: #5825aa">待修改</span> ';
  1341. } else if (item.project_status === 3) {
  1342. html = '<span class="layui-badge layui-bg-green" style="background-color: #d37000">待接收</span> ';
  1343. } else if (item.project_status === 4) {
  1344. html = '<span class="layui-badge" style="background-color: #005fa8">分配中</span> ';
  1345. } else if (item.project_status === 5) {
  1346. html = '<span class="layui-badge layui-bg-blue" style="background-color: #1e9fff">作业中</span> ';
  1347. } else if (item.project_status === 6) {
  1348. html = '<span class="layui-badge" style="background-color: #007244">归档中</span> ';
  1349. } else if (item.project_status === 7) {
  1350. html = '<span class="layui-badge" style="background-color: #881f1f">退审中</span> ';
  1351. } else if (item.project_status === 8) {
  1352. html = '<span class="layui-badge" style="background-color: #16b777">已归档</span> ';
  1353. } else if (item.project_status === 9) {
  1354. html = '<span class="layui-badge" style="background-color: #d81e06">已退审</span> ';
  1355. }
  1356. return html;
  1357. }
  1358. },
  1359. {
  1360. field: 'project_name',
  1361. title: '项目名称',
  1362. align: 'center',
  1363. width: 400
  1364. }, {
  1365. field: 'project_num',
  1366. title: '项目编号',
  1367. align: 'center',
  1368. width: 200
  1369. }, {
  1370. field: 'project_time',
  1371. title: '项目周期',
  1372. align: 'center',
  1373. width: 300,
  1374. templet: function (item) {
  1375. var html;
  1376. html =
  1377. "<div>" +
  1378. layui.util.toDateString(item.project_start_time * 1000, 'yyyy-MM-dd') +
  1379. "~" +
  1380. layui.util.toDateString(item.project_end_time * 1000, 'yyyy-MM-dd') +
  1381. "</div>";
  1382. return html;
  1383. }
  1384. }, {
  1385. field: 'entrust_unit_name',
  1386. title: '委托单位',
  1387. align: 'center',
  1388. width: 150
  1389. }, {
  1390. field: 'entrust_head',
  1391. title: '委托单位负责人',
  1392. align: 'center',
  1393. width: 200
  1394. }, {
  1395. field: 'entrust_head_phone',
  1396. title: '委托单位负责人电话',
  1397. align: 'center',
  1398. width: 250
  1399. }, {
  1400. fixed: 'right',
  1401. field: 'right',
  1402. title: '操作',
  1403. width: 136,
  1404. align: 'center',
  1405. templet: function (a) {
  1406. var h = '';
  1407. // 1全部-可查看可编辑,2全部-可查看,0与我有关
  1408. // console.log(a.self_id);
  1409. if(a.self_id == 1){
  1410. if(a.project_status==1){
  1411. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1412. } else {
  1413. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1414. }
  1415. }else if(a.self_id == 2){
  1416. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a></div>'
  1417. }else if(a.self_id == 0 || a.self_id == 3){
  1418. if(a.project_status==1){
  1419. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1420. } else {
  1421. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1422. }
  1423. }
  1424. return h;
  1425. }
  1426. }]
  1427. ]
  1428. });
  1429. table.on('tool(cost_project2)', function (obj) {
  1430. var data = obj.data;
  1431. if (obj.event === 'read') {
  1432. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1433. } else if (obj.event === 'edit') {
  1434. if (obj.data.project_status<6) {
  1435. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1436. }else {
  1437. layer.msg("已归档/已退审")
  1438. }
  1439. } else if (obj.event === 'del') {
  1440. layer.confirm('确定要删除该记录吗?', {
  1441. icon: 3,
  1442. title: '提示'
  1443. }, function (index) {
  1444. if (data.project_status == 1) {
  1445. let callback = function (e) {
  1446. layer.msg(e.msg);
  1447. if (e.code == 0) {
  1448. obj.del();
  1449. }
  1450. }
  1451. tool.delete("/admin/project.cost/del", {id: data.id}, callback);
  1452. layer.close(index);
  1453. }else {
  1454. layer.msg("已审核,无法删除");
  1455. }
  1456. });
  1457. }
  1458. return false;
  1459. });
  1460. layui.headTable = table.render({
  1461. elem: '#head',
  1462. title: '通讯录外部',
  1463. url: '/admin/index/head',
  1464. page: false,
  1465. limit: 20,
  1466. parseData: function(res) { // 数据解析回调函数
  1467. // 在这里可以获取数据总数
  1468. allcount = res.count;
  1469. return {
  1470. code: res.code, // 数据状态码
  1471. msg: res.msg, // 状态信息
  1472. count: res.count, // 数据总数
  1473. data: res.data // 当前页数据
  1474. };
  1475. },
  1476. cols: [
  1477. [
  1478. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1479. templet: function(d){
  1480. return allcount - (d.LAY_NUM-1);
  1481. }
  1482. }, {
  1483. field: 'title',
  1484. title: '公司名称',
  1485. align: 'center',
  1486. }, {
  1487. field: 'nickname',
  1488. title: '联系人',
  1489. align: 'center',
  1490. }, {
  1491. field: 'mobile',
  1492. title: '电话',
  1493. align: 'center',
  1494. }, {
  1495. field: 'email',
  1496. title: '电子邮箱',
  1497. align: 'center',
  1498. },
  1499. ]
  1500. ]
  1501. });
  1502. layui.peopleTable = table.render({
  1503. elem: '#people',
  1504. title: '通讯录内部',
  1505. //toolbar: '#toolbarDemo',
  1506. url: '/admin/index/people',
  1507. limit: 20,
  1508. parseData: function(res) { // 数据解析回调函数
  1509. // 在这里可以获取数据总数
  1510. allcount = res.count;
  1511. return {
  1512. code: res.code, // 数据状态码
  1513. msg: res.msg, // 状态信息
  1514. count: res.count, // 数据总数
  1515. data: res.data // 当前页数据
  1516. };
  1517. },
  1518. cols: [
  1519. [{fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1520. templet: function(d){
  1521. return allcount - (d.LAY_NUM-1);
  1522. }
  1523. }, {
  1524. field: 'nickname',
  1525. title: '联系人',
  1526. align: 'center',
  1527. }, {
  1528. field: 'mobile',
  1529. title: '电话',
  1530. align: 'center',
  1531. }, {
  1532. field: 'email',
  1533. title: '电子邮箱',
  1534. align: 'center',
  1535. }]
  1536. ]
  1537. });
  1538. //监听搜索提交
  1539. form.on('submit(webform)', function (data) {
  1540. layui.peopleTable.reload({
  1541. where: {
  1542. nickname: data.field.nickname
  1543. },
  1544. });
  1545. return false;
  1546. });
  1547. form.on('submit(webform2)', function (data) {
  1548. layui.headTable.reload({
  1549. where: {
  1550. nickname: data.field.nickname2
  1551. },
  1552. });
  1553. return false;
  1554. });
  1555. form.on('submit(project-search)', function (data) {
  1556. layui.project2Table.reload({
  1557. where: data.field,
  1558. });
  1559. return false;
  1560. });
  1561. layui.use(function () {
  1562. var layer = layui.layer;
  1563. var form = layui.form;
  1564. var laydate = layui.laydate;
  1565. var util = layui.util;
  1566. laydate.render({
  1567. elem: '#test2',
  1568. position: 'static',
  1569. theme: '#1A75FF',
  1570. calendar: 'true',
  1571. showBottom: false,
  1572. });
  1573. });
  1574. }
  1575. </script>
  1576. <!--显示实时年份-->
  1577. <script>
  1578. `use strict`
  1579. var datetime = new Date().getFullYear();
  1580. // console.log(datetime); // it will represent date in the console of developers tool
  1581. document.getElementById("time1").textContent = datetime; //it will print on html page
  1582. document.getElementById("time2").textContent = datetime;
  1583. </script>
  1584. {/block}
  1585. <!-- /脚本 -->