main.html 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919
  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 == 0) {
  814. if (data.project_status == 2) {
  815. //立项
  816. tool.post("/admin/project.audit/project_edit_first2", {
  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. }
  824. }
  825. else if (data.audit_type == 1) {
  826. if (data.project_status == 2) {
  827. //立项审批
  828. tool.post("/admin/project.audit/project_edit_first", {
  829. id: data.id,
  830. else_id: data.else_id,
  831. audit_type: data.audit_type,
  832. project_id: data.project_id,
  833. project_status: data.project_status,
  834. }, callback);
  835. } else if (data.project_status == 6) {
  836. tool.post("/admin/project.audit/project_edit_second", {
  837. id: data.id,
  838. else_id: data.else_id,
  839. audit_type: data.audit_type,
  840. project_id: data.project_id,
  841. project_status: data.project_status,
  842. }, callback);
  843. } else if (data.project_status == 7) {
  844. //退审审批
  845. tool.post("/admin/project.audit/project_edit_third", {
  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. }, callback);
  852. }
  853. } else if (data.audit_type == 2) {
  854. if (data.else_status == 0) {
  855. //报告新建
  856. console.log(1)
  857. tool.post("/admin/project.report/agree_report", {
  858. id: data.id,
  859. else_id: data.else_id,
  860. audit_type: data.audit_type,
  861. project_id: data.project_id,
  862. project_status: data.project_status,
  863. type: 1000,
  864. }, callback);
  865. } else if (data.else_status == 3) {
  866. //报告删除
  867. tool.post("/admin/project.report/agree_delete", {
  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. }
  876. } else if (data.audit_type == 3) {
  877. if (data.else_status == 0) {
  878. //联系函新建
  879. tool.post("/admin/project.contact/agree_contact", {
  880. id: data.id,
  881. else_id: data.else_id,
  882. audit_type: data.audit_type,
  883. project_id: data.project_id,
  884. project_status: data.project_status,
  885. type: 1000,
  886. }, callback);
  887. } else if (data.else_status == 3) {
  888. //联系函删除
  889. tool.post("/admin/project.contact/agree_delete", {
  890. id: data.id,
  891. else_id: data.else_id,
  892. audit_type: data.audit_type,
  893. project_id: data.project_id,
  894. project_status: data.project_status,
  895. type: 1000,
  896. }, callback);
  897. }
  898. }else{
  899. layer.msg("请联系管理员")
  900. }
  901. // console.log(abc, data.else_status)
  902. abc = 1;
  903. }
  904. }, function () {
  905. abc = 0;
  906. })
  907. } else if (obj.event === 'overrule') {
  908. layer.prompt({
  909. title: '请输入<span style="color: red">拒绝</span>原因',
  910. formType: 2,
  911. area: ['35vw', '15vw']
  912. }, function (text, index) {
  913. if (text == '') {
  914. layer.msg('请先完善拒绝原因');
  915. return false;
  916. } else {
  917. let callback = function (e) {
  918. layer.msg(e.msg);
  919. listount--;
  920. if (listount == 0) {
  921. parent.showhongdian()
  922. }
  923. setTimeout(function () {
  924. window.location.reload()
  925. layer.close(index);
  926. }, 2000)
  927. }
  928. if (data.audit_type == 1) {
  929. if (data.project_status == 2) {
  930. //立项
  931. tool.post("/admin/project.audit/project_overrule_first", {
  932. id: data.id,
  933. else_id: data.else_id,
  934. audit_type: data.audit_type,
  935. project_id: data.project_id,
  936. project_status: data.project_status,
  937. audit_remark: text,
  938. }, callback);
  939. } else if (data.project_status == 6) {
  940. //归档
  941. tool.post("/admin/project.audit/project_overrule_second", {
  942. id: data.id,
  943. else_id: data.else_id,
  944. audit_type: data.audit_type,
  945. project_id: data.project_id,
  946. project_status: data.project_status,
  947. audit_remark: text,
  948. }, callback);
  949. } else if (data.project_status == 7) {
  950. //退审
  951. tool.post("/admin/project.audit/project_overrule_third", {
  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. }, callback);
  959. }
  960. } else if (data.audit_type == 2) {
  961. if (data.else_status == 0) {
  962. //报告新建
  963. tool.post("/admin/project.report/un_report", {
  964. id: data.id,
  965. else_id: data.else_id,
  966. audit_type: data.audit_type,
  967. project_id: data.project_id,
  968. project_status: data.project_status,
  969. audit_remark: text,
  970. type: 1000,
  971. }, callback);
  972. } else if (data.else_status == 3) {
  973. //报告删除
  974. tool.post("/admin/project.report/un_delete", {
  975. id: data.id,
  976. else_id: data.else_id,
  977. audit_type: data.audit_type,
  978. project_id: data.project_id,
  979. project_status: data.project_status,
  980. audit_remark: text,
  981. type: 1000,
  982. }, callback);
  983. }
  984. } else if (data.audit_type == 3) {
  985. if (data.else_status == 0) {
  986. //联系函新建
  987. tool.post("/admin/project.contact/un_contact", {
  988. id: data.id,
  989. else_id: data.else_id,
  990. audit_type: data.audit_type,
  991. project_id: data.project_id,
  992. project_status: data.project_status,
  993. audit_remark: text,
  994. type: 1000,
  995. }, callback);
  996. } else if (data.else_status == 3) {
  997. //联系函删除
  998. tool.post("/admin/project.contact/un_delete", {
  999. id: data.id,
  1000. else_id: data.else_id,
  1001. audit_type: data.audit_type,
  1002. project_id: data.project_id,
  1003. project_status: data.project_status,
  1004. audit_remark: text,
  1005. type: 1000,
  1006. }, callback);
  1007. }
  1008. }
  1009. else{
  1010. layer.msg("请联系管理员")
  1011. }
  1012. }
  1013. })
  1014. }
  1015. return false;
  1016. });
  1017. //临期表格
  1018. layui.pageTable = table.render({
  1019. elem: '#advent_project',
  1020. title: '临期项目',
  1021. url: '/admin/project.cost/list',
  1022. page: false,
  1023. limit: 20,
  1024. cellMinWidth: 80,
  1025. parseData: function(res) { // 数据解析回调函数
  1026. // 在这里可以获取数据总数
  1027. allcount = res.count;
  1028. return {
  1029. code: res.code, // 数据状态码
  1030. msg: res.msg, // 状态信息
  1031. count: res.count, // 数据总数
  1032. data: res.data // 当前页数据
  1033. };
  1034. },
  1035. cols: [
  1036. [
  1037. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1038. templet: function(d){
  1039. return allcount - (d.LAY_NUM-1);
  1040. }
  1041. }, {
  1042. field: 'project_status',
  1043. title: '项目状态',
  1044. align: 'center',
  1045. width: 100,
  1046. templet: function (item) {
  1047. var html = '';
  1048. if (item.project_status === 1) {
  1049. html = '<span class="layui-badge layui-bg-orange">立项中</span> ';
  1050. } else if (item.project_status === 2) {
  1051. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  1052. } else if (item.project_status === -1) {
  1053. html = '<span class="layui-badge layui-bg-red">待修改</span> ';
  1054. } else if (item.project_status === 3) {
  1055. html = '<span class="layui-badge layui-bg-green">待接收</span> ';
  1056. } else if (item.project_status === 4) {
  1057. html =
  1058. '<span class="layui-badge" style="background-color: #31bdec">分配中</span> ';
  1059. } else if (item.project_status === 5) {
  1060. html =
  1061. '<span class="layui-badge" style="background-color: #31bdec">作业中</span> ';
  1062. } else if (item.project_status === 6) {
  1063. html =
  1064. '<span class="layui-badge" style="background-color: #31bdec">归档中</span> ';
  1065. } else if (item.project_status === 7) {
  1066. html =
  1067. '<span class="layui-badge" style="background-color: #31bdec">退审中</span> ';
  1068. } else if (item.project_status === 8) {
  1069. html =
  1070. '<span class="layui-badge" style="background-color: #31bdec">已归档</span> ';
  1071. } else if (item.project_status === 9) {
  1072. html =
  1073. '<span class="layui-badge" style="background-color: #31bdec">已退审</span> ';
  1074. }
  1075. return html;
  1076. }
  1077. }, {
  1078. field: 'project_name',
  1079. title: '项目名称',
  1080. align: 'center',
  1081. }, {
  1082. field: 'project_num',
  1083. title: '项目编号',
  1084. align: 'center',
  1085. }, {
  1086. field: 'project_time',
  1087. title: '剩余时间',
  1088. align: 'center',
  1089. width: 100,
  1090. templet: function (item) {
  1091. let outcome = Math.round(new Date().getTime() / 1000).toString();
  1092. var advent_time = item.project_end_time - outcome
  1093. // console.log(advent_time);
  1094. function getDuration(second) {
  1095. var duration
  1096. var days = Math.floor(second / 86400);
  1097. var hours = Math.floor((second % 86400) / 3600);
  1098. var minutes = Math.floor(((second % 86400) % 3600) / 60);
  1099. var seconds = Math.floor(((second % 86400) % 3600) % 60);
  1100. if (days > 0) duration = days + "天";
  1101. else if (hours > 0) duration = hours + "小时";
  1102. else if (minutes > 0) duration = minutes + "分";
  1103. else if (seconds > 0) duration = seconds + "秒";
  1104. return duration;
  1105. }
  1106. return getDuration(advent_time);
  1107. }
  1108. },
  1109. {
  1110. fixed: 'right',
  1111. field: 'right',
  1112. title: '操作',
  1113. width: 136,
  1114. align: 'center',
  1115. templet: function (a) {
  1116. var h = '';
  1117. var arr = [3, 4, 5];
  1118. if (a.self_id == a.entrust_maker) {
  1119. if (a.project_status == 1) {
  1120. 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>'
  1121. } else if (arr.indexOf(a.project_status) !== -1) {
  1122. 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>'
  1123. } else {
  1124. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1125. }
  1126. } else {
  1127. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1128. }
  1129. return h;
  1130. }
  1131. }
  1132. ]
  1133. ]
  1134. });
  1135. //临期表格监听表格行工具事件
  1136. table.on('tool(advent_project)', function (obj) {
  1137. var data = obj.data;
  1138. if (obj.event === 'read') {
  1139. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1140. } else if (obj.event === 'edit') {
  1141. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1142. } else if (obj.event === 'del') {
  1143. layer.confirm('确定要删除该记录吗?', {
  1144. icon: 3,
  1145. title: '提示'
  1146. }, function (index) {
  1147. if (data.project_status < 3) {
  1148. let callback = function (e) {
  1149. layer.msg(e.msg);
  1150. if (e.code == 0) {
  1151. obj.del();
  1152. }
  1153. }
  1154. tool.delete("/admin/project.cost/del", {
  1155. id: data.id
  1156. }, callback);
  1157. layer.close(index);
  1158. }
  1159. layer.msg("已审核,无法删除");
  1160. });
  1161. }
  1162. return false;
  1163. });
  1164. //逾期表格
  1165. layui.pageTable = table.render({
  1166. elem: '#late_project',
  1167. title: '逾期项目',
  1168. url: '/admin/project.cost/list2',
  1169. page: false,
  1170. limit: 20,
  1171. cellMinWidth: 80,
  1172. parseData: function(res) { // 数据解析回调函数
  1173. // 在这里可以获取数据总数
  1174. allcount = res.count;
  1175. return {
  1176. code: res.code, // 数据状态码
  1177. msg: res.msg, // 状态信息
  1178. count: res.count, // 数据总数
  1179. data: res.data // 当前页数据
  1180. };
  1181. },
  1182. cols: [
  1183. [
  1184. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1185. templet: function(d){
  1186. return allcount - (d.LAY_NUM-1);
  1187. }
  1188. }, {
  1189. field: 'project_status',
  1190. title: '项目状态',
  1191. align: 'center',
  1192. width: 100,
  1193. templet: function (item) {
  1194. var html = '';
  1195. if (item.project_status === 1) {
  1196. html = '<span class="layui-badge layui-bg-orange">立项中</span> ';
  1197. } else if (item.project_status === 2) {
  1198. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  1199. } else if (item.project_status === -1) {
  1200. html = '<span class="layui-badge layui-bg-red">待修改</span> ';
  1201. } else if (item.project_status === 3) {
  1202. html = '<span class="layui-badge layui-bg-green">待接收</span> ';
  1203. } else if (item.project_status === 4) {
  1204. html =
  1205. '<span class="layui-badge" style="background-color: #31bdec">分配中</span> ';
  1206. } else if (item.project_status === 5) {
  1207. html =
  1208. '<span class="layui-badge" style="background-color: #31bdec">作业中</span> ';
  1209. } else if (item.project_status === 6) {
  1210. html =
  1211. '<span class="layui-badge" style="background-color: #31bdec">归档中</span> ';
  1212. } else if (item.project_status === 7) {
  1213. html =
  1214. '<span class="layui-badge" style="background-color: #31bdec">退审中</span> ';
  1215. } else if (item.project_status === 8) {
  1216. html =
  1217. '<span class="layui-badge" style="background-color: #31bdec">已归档</span> ';
  1218. } else if (item.project_status === 9) {
  1219. html =
  1220. '<span class="layui-badge" style="background-color: #31bdec">已退审</span> ';
  1221. }
  1222. return html;
  1223. }
  1224. }, {
  1225. field: 'project_name',
  1226. title: '项目名称',
  1227. align: 'center',
  1228. }, {
  1229. field: 'project_num',
  1230. title: '项目编号',
  1231. align: 'center',
  1232. }, {
  1233. field: 'project_time',
  1234. title: '逾期时间',
  1235. align: 'center',
  1236. width: 100,
  1237. templet: function (item) {
  1238. let outcome = Math.round(new Date().getTime() / 1000).toString();
  1239. var advent_time = item.project_end_time - outcome
  1240. var time = getDuration(advent_time);
  1241. var timestr = "<span style='color: green'>" + "剩余" + time + "</span>";
  1242. if (advent_time < 0) {
  1243. advent_time = -advent_time;
  1244. time = getDuration(advent_time);
  1245. timestr = "<span style='color: red'>" + "逾期" + time + "</span>";
  1246. }
  1247. var html;
  1248. html =
  1249. "<div>" + timestr + "</div>";
  1250. function getDuration(second) {
  1251. var duration
  1252. var days = Math.floor(second / 86400);
  1253. var hours = Math.floor((second % 86400) / 3600);
  1254. if (days > 0) duration = days + "天";
  1255. else if (hours > 0) duration = "不足一天";
  1256. else if (hours == 0) duration = "不足一天";
  1257. return duration;
  1258. }
  1259. return html;
  1260. }
  1261. },
  1262. {
  1263. fixed: 'right',
  1264. field: 'right',
  1265. title: '操作',
  1266. width: 136,
  1267. align: 'center',
  1268. templet: function (a) {
  1269. var h = '';
  1270. var arr = [3, 4, 5];
  1271. if (a.self_id == a.entrust_maker) {
  1272. if (a.project_status == 1) {
  1273. 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>'
  1274. } else if (arr.indexOf(a.project_status) !== -1) {
  1275. 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>'
  1276. } else {
  1277. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1278. }
  1279. } else {
  1280. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1281. }
  1282. return h;
  1283. }
  1284. }
  1285. ]
  1286. ]
  1287. });
  1288. //逾期表格
  1289. table.on('tool(late_project)', function (obj) {
  1290. var data = obj.data;
  1291. if (obj.event === 'read') {
  1292. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1293. } else if (obj.event === 'edit') {
  1294. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1295. } else if (obj.event === 'del') {
  1296. layer.confirm('确定要删除该记录吗?', {
  1297. icon: 3,
  1298. title: '提示'
  1299. }, function (index) {
  1300. if (data.project_status < 3) {
  1301. let callback = function (e) {
  1302. layer.msg(e.msg);
  1303. if (e.code == 0) {
  1304. obj.del();
  1305. }
  1306. }
  1307. tool.delete("/admin/project.cost/del", {
  1308. id: data.id
  1309. }, callback);
  1310. layer.close(index);
  1311. }
  1312. layer.msg("已审核,无法删除");
  1313. });
  1314. }
  1315. return false;
  1316. });
  1317. layui.project2Table = table.render({
  1318. elem: '#cost_project2',
  1319. title: '造价项目列表',
  1320. //toolbar: '#toolbarDemo',
  1321. url: '/admin/project.cost/datalist',
  1322. limit: 20,
  1323. parseData: function(res) { // 数据解析回调函数
  1324. // 在这里可以获取数据总数
  1325. allcount = res.count;
  1326. return {
  1327. code: res.code, // 数据状态码
  1328. msg: res.msg, // 状态信息
  1329. count: res.count, // 数据总数
  1330. data: res.data // 当前页数据
  1331. };
  1332. },
  1333. cols: [
  1334. [
  1335. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1336. templet: function(d){
  1337. return allcount - (d.LAY_NUM-1);
  1338. }
  1339. },
  1340. {
  1341. field: 'project_status',
  1342. title: '项目状态',
  1343. align: 'center',
  1344. width: 100,
  1345. templet: function (item) {
  1346. var html = '';
  1347. if (item.project_status === 1) {
  1348. html = '<span class="layui-badge layui-bg-orange" style="background-color: #ffb800">立项中</span> ';
  1349. } else if (item.project_status === 2) {
  1350. html = '<span class="layui-badge layui-bg-blue" style="background-color: #b30095">审批中</span> ';
  1351. } else if (item.project_status === -1) {
  1352. html = '<span class="layui-badge layui-bg-red" style="background-color: #5825aa">待修改</span> ';
  1353. } else if (item.project_status === 3) {
  1354. html = '<span class="layui-badge layui-bg-green" style="background-color: #d37000">待接收</span> ';
  1355. } else if (item.project_status === 4) {
  1356. html = '<span class="layui-badge" style="background-color: #005fa8">分配中</span> ';
  1357. } else if (item.project_status === 5) {
  1358. html = '<span class="layui-badge layui-bg-blue" style="background-color: #1e9fff">作业中</span> ';
  1359. } else if (item.project_status === 6) {
  1360. html = '<span class="layui-badge" style="background-color: #007244">归档中</span> ';
  1361. } else if (item.project_status === 7) {
  1362. html = '<span class="layui-badge" style="background-color: #881f1f">退审中</span> ';
  1363. } else if (item.project_status === 8) {
  1364. html = '<span class="layui-badge" style="background-color: #16b777">已归档</span> ';
  1365. } else if (item.project_status === 9) {
  1366. html = '<span class="layui-badge" style="background-color: #d81e06">已退审</span> ';
  1367. }
  1368. return html;
  1369. }
  1370. },
  1371. {
  1372. field: 'project_name',
  1373. title: '项目名称',
  1374. align: 'center',
  1375. width: 400
  1376. }, {
  1377. field: 'project_num',
  1378. title: '项目编号',
  1379. align: 'center',
  1380. width: 200
  1381. }, {
  1382. field: 'project_time',
  1383. title: '项目周期',
  1384. align: 'center',
  1385. width: 300,
  1386. templet: function (item) {
  1387. var html;
  1388. html =
  1389. "<div>" +
  1390. layui.util.toDateString(item.project_start_time * 1000, 'yyyy-MM-dd') +
  1391. "~" +
  1392. layui.util.toDateString(item.project_end_time * 1000, 'yyyy-MM-dd') +
  1393. "</div>";
  1394. return html;
  1395. }
  1396. }, {
  1397. field: 'entrust_unit_name',
  1398. title: '委托单位',
  1399. align: 'center',
  1400. width: 150
  1401. }, {
  1402. field: 'entrust_head',
  1403. title: '委托单位负责人',
  1404. align: 'center',
  1405. width: 200
  1406. }, {
  1407. field: 'entrust_head_phone',
  1408. title: '委托单位负责人电话',
  1409. align: 'center',
  1410. width: 250
  1411. }, {
  1412. fixed: 'right',
  1413. field: 'right',
  1414. title: '操作',
  1415. width: 136,
  1416. align: 'center',
  1417. templet: function (a) {
  1418. var h = '';
  1419. // 1全部-可查看可编辑,2全部-可查看,0与我有关
  1420. // console.log(a.self_id);
  1421. if(a.self_id == 1){
  1422. if(a.project_status==1){
  1423. 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>'
  1424. } else {
  1425. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1426. }
  1427. }else if(a.self_id == 2){
  1428. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a></div>'
  1429. }else if(a.self_id == 0 || a.self_id == 3){
  1430. if(a.project_status==1){
  1431. 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>'
  1432. } else {
  1433. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1434. }
  1435. }
  1436. return h;
  1437. }
  1438. }]
  1439. ]
  1440. });
  1441. table.on('tool(cost_project2)', function (obj) {
  1442. var data = obj.data;
  1443. if (obj.event === 'read') {
  1444. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1445. } else if (obj.event === 'edit') {
  1446. if (obj.data.project_status<6) {
  1447. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1448. }else {
  1449. layer.msg("已归档/已退审")
  1450. }
  1451. } else if (obj.event === 'del') {
  1452. layer.confirm('确定要删除该记录吗?', {
  1453. icon: 3,
  1454. title: '提示'
  1455. }, function (index) {
  1456. if (data.project_status == 1) {
  1457. let callback = function (e) {
  1458. layer.msg(e.msg);
  1459. if (e.code == 0) {
  1460. obj.del();
  1461. }
  1462. }
  1463. tool.delete("/admin/project.cost/del", {id: data.id}, callback);
  1464. layer.close(index);
  1465. }else {
  1466. layer.msg("已审核,无法删除");
  1467. }
  1468. });
  1469. }
  1470. return false;
  1471. });
  1472. layui.headTable = table.render({
  1473. elem: '#head',
  1474. title: '通讯录外部',
  1475. url: '/admin/index/head',
  1476. page: false,
  1477. limit: 20,
  1478. parseData: function(res) { // 数据解析回调函数
  1479. // 在这里可以获取数据总数
  1480. allcount = res.count;
  1481. return {
  1482. code: res.code, // 数据状态码
  1483. msg: res.msg, // 状态信息
  1484. count: res.count, // 数据总数
  1485. data: res.data // 当前页数据
  1486. };
  1487. },
  1488. cols: [
  1489. [
  1490. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1491. templet: function(d){
  1492. return allcount - (d.LAY_NUM-1);
  1493. }
  1494. }, {
  1495. field: 'title',
  1496. title: '公司名称',
  1497. align: 'center',
  1498. }, {
  1499. field: 'nickname',
  1500. title: '联系人',
  1501. align: 'center',
  1502. }, {
  1503. field: 'mobile',
  1504. title: '电话',
  1505. align: 'center',
  1506. }, {
  1507. field: 'email',
  1508. title: '电子邮箱',
  1509. align: 'center',
  1510. },
  1511. ]
  1512. ]
  1513. });
  1514. layui.peopleTable = table.render({
  1515. elem: '#people',
  1516. title: '通讯录内部',
  1517. //toolbar: '#toolbarDemo',
  1518. url: '/admin/index/people',
  1519. limit: 20,
  1520. parseData: function(res) { // 数据解析回调函数
  1521. // 在这里可以获取数据总数
  1522. allcount = res.count;
  1523. return {
  1524. code: res.code, // 数据状态码
  1525. msg: res.msg, // 状态信息
  1526. count: res.count, // 数据总数
  1527. data: res.data // 当前页数据
  1528. };
  1529. },
  1530. cols: [
  1531. [{fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1532. templet: function(d){
  1533. return allcount - (d.LAY_NUM-1);
  1534. }
  1535. }, {
  1536. field: 'nickname',
  1537. title: '联系人',
  1538. align: 'center',
  1539. }, {
  1540. field: 'mobile',
  1541. title: '电话',
  1542. align: 'center',
  1543. }, {
  1544. field: 'email',
  1545. title: '电子邮箱',
  1546. align: 'center',
  1547. }]
  1548. ]
  1549. });
  1550. //监听搜索提交
  1551. form.on('submit(webform)', function (data) {
  1552. layui.peopleTable.reload({
  1553. where: {
  1554. nickname: data.field.nickname
  1555. },
  1556. });
  1557. return false;
  1558. });
  1559. form.on('submit(webform2)', function (data) {
  1560. layui.headTable.reload({
  1561. where: {
  1562. nickname: data.field.nickname2
  1563. },
  1564. });
  1565. return false;
  1566. });
  1567. form.on('submit(project-search)', function (data) {
  1568. layui.project2Table.reload({
  1569. where: data.field,
  1570. });
  1571. return false;
  1572. });
  1573. layui.use(function () {
  1574. var layer = layui.layer;
  1575. var form = layui.form;
  1576. var laydate = layui.laydate;
  1577. var util = layui.util;
  1578. laydate.render({
  1579. elem: '#test2',
  1580. position: 'static',
  1581. theme: '#1A75FF',
  1582. calendar: 'true',
  1583. showBottom: false,
  1584. });
  1585. });
  1586. }
  1587. </script>
  1588. <!--显示实时年份-->
  1589. <script>
  1590. `use strict`
  1591. var datetime = new Date().getFullYear();
  1592. // console.log(datetime); // it will represent date in the console of developers tool
  1593. document.getElementById("time1").textContent = datetime; //it will print on html page
  1594. document.getElementById("time2").textContent = datetime;
  1595. </script>
  1596. {/block}
  1597. <!-- /脚本 -->