main_proprietor.html 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921
  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. <!-- 这里下面没有了-->
  486. <div class="layui-row layui-col-space12">
  487. {if $home_five.audit_project == 1}
  488. <div class="layui-col-md5 middle-left">
  489. <div class="layui-card">
  490. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  491. <div class="layui-tab layui-tab-brief" style="height: 88%;">
  492. <ul class="layui-tab-title" style="font-size: 1vw; font-weight: 600;">
  493. <li class="layui-this" style="font-size: 0.95vw;">
  494. 待审核任务
  495. </li>
  496. </ul>
  497. <div class="layui-tab-content" style="height: 100%; overflow: scroll;">
  498. <table class="layui-hide" id="cost_project" lay-filter="cost_project"></table>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. {/if}
  505. {if $home_five.imminent_project == 1 || $home_five.overdue_item == 1}
  506. <div class="layui-col-md4 middle-right">
  507. <div class="layui-card">
  508. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  509. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"
  510. style="height: 63.75vh; /* 容器高度 */overflow: hidden;">
  511. <ul class="layui-tab-title" style="font-size: 1vw; font-weight: 600;color: grey;">
  512. {if $home_five.imminent_project == 1}
  513. <li class="layui-this" style="font-size: 0.95vw;">
  514. 临期项目
  515. </li>
  516. {/if}
  517. {if $home_five.overdue_item == 1}
  518. <li style="font-size: 0.95vw;">
  519. 逾期项目
  520. </li>
  521. {/if}
  522. </ul>
  523. <div class="layui-tab-content" style="height: 100%; overflow: scroll;">
  524. {if $home_five.imminent_project == 1}
  525. <div class="layui-tab-item layui-show">
  526. <table class="layui-hide" id="advent_project" lay-filter="advent_project"></table>
  527. </div>
  528. {/if}
  529. {if $home_five.overdue_item == 1}
  530. <div class="layui-tab-item">
  531. <table class="layui-hide" id="late_project" lay-filter="late_project"></table>
  532. </div>
  533. {/if}
  534. <div class="layui-tab-item"></div>
  535. </div>
  536. </div>
  537. </div>
  538. </div>
  539. </div>
  540. {/if}
  541. {if $home_five.list_project == 1}
  542. <div class="layui-col-md3 middle-left">
  543. <div class="layui-card">
  544. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  545. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="height: 88%;">
  546. <div class="layui-card-header top-title" style="font-size: 0.95vw;font-weight: 600;">
  547. 项目列表
  548. </div>
  549. <div class="layui-tab-content" style="height: 100%; overflow: scroll;padding: 0 0 10px 0;">
  550. <form id="projectForm" class="layui-form" lay-filter="barsearchform">
  551. <div class="layui-card-body layui-col-space11 eleven">
  552. <div class="layui-col-md3 main-input-name" style="width: 40%;">
  553. <label class="layui-form-label">
  554. 项目名称:
  555. </label>
  556. <div class="layui-input-block">
  557. <input type="text" name="project_name" placeholder="请输入项目名称" autocomplete="off"
  558. class="layui-input main-input">
  559. </div>
  560. </div>
  561. <div class="layui-col-md3 main-input-name" style="width: 35%;">
  562. <label class="layui-form-label" style="text-align: center;">
  563. 负责人:
  564. </label>
  565. <div class="layui-input-block">
  566. <input type="text" name="review_head_name" placeholder="请输入负责人" autocomplete="off"
  567. class="layui-input main-input">
  568. </div>
  569. </div>
  570. <div class="layui-col-md3 main-input-name">
  571. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="project-search"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  572. <button type="reset" class="layui-btn layui-btn-primary swiper-right-form-reset" lay-submit="" lay-filter="reset">重置</button>
  573. </div>
  574. </div>
  575. </form>
  576. <div class="layui-tab-item layui-show">
  577. <table class="layui-hide" id="cost_project2" lay-filter="cost_project2"></table>
  578. </div>
  579. </div>
  580. </div>
  581. </div>
  582. </div>
  583. </div>
  584. {/if}
  585. {if $home_five.address_book == 1}
  586. <div class="layui-col-md3 middle-right">
  587. <div class="layui-card">
  588. <div class="layui-card-body bottom-box-left" style="padding-top: 0;overflow: hidden;">
  589. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  590. <!-- <div class="layui-card-header top-title" style="font-size: 0.95vw;font-weight: 600;">
  591. 通讯录
  592. </div> -->
  593. <ul class="layui-tab-title"
  594. style="font-size: 1vw; font-weight: 600;color: grey;display: flex;justify-content: flex-end;align-items: center;">
  595. <div style="left: 2%;position: absolute;">通讯录</div>
  596. <li class="layui-this" style="font-size: 0.95vw;">
  597. 内部
  598. </li>
  599. <li style="font-size: 0.95vw;">
  600. 外部
  601. </li>
  602. </ul>
  603. <div class="layui-tab-content" style="height: 100%; overflow: scroll;padding: 0 0 10px 0;">
  604. <div class="layui-tab-item layui-show">
  605. <form id="peopleForm" class="layui-form" lay-filter="barsearchform">
  606. <div class="layui-card-body layui-col-space11 eleven">
  607. <div class="layui-col-md5 main-input-name" style="width: 65%;">
  608. <label class="layui-form-label" style="width: 7vw;">
  609. 联系人姓名:
  610. </label>
  611. <div class="layui-input-block">
  612. <input type="text" name="nickname" placeholder="请输入联系人姓名" autocomplete="off" class="layui-input main-input">
  613. </div>
  614. </div>
  615. <div class="layui-col-md2 main-input-name">
  616. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  617. <button type="reset" class="layui-btn layui-btn-primary swiper-right-form-reset" lay-submit="" lay-filter="reset">重置</button>
  618. </div>
  619. </div>
  620. </form>
  621. <table class="layui-hide" id="people" lay-filter="people"></table>
  622. </div>
  623. <div class="layui-tab-item">
  624. <form id="peopleForm2" class="layui-form" lay-filter="barsearchform">
  625. <div class="layui-card-body layui-col-space11 eleven">
  626. <div class="layui-col-md5 main-input-name" style="width: 65%;">
  627. <label class="layui-form-label" style="width: 7vw;">
  628. 联系人/单位名称:
  629. </label>
  630. <div class="layui-input-block">
  631. <input type="text" name="nickname2" placeholder="请输入联系人/单位名称" autocomplete="off" class="layui-input main-input">
  632. </div>
  633. </div>
  634. <div class="layui-col-md2 main-input-name">
  635. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform2"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  636. <button type="reset" class="layui-btn layui-btn-primary swiper-right-form-reset" lay-submit="" lay-filter="reset">重置</button>
  637. </div>
  638. </div>
  639. </form>
  640. <table class="layui-hide" id="head" lay-filter="head"></table>
  641. </div>
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. </div>
  647. {/if}
  648. </div>
  649. </div>
  650. <div class="layui-col-md4">
  651. </div>
  652. {/block}
  653. <!-- /主体 -->
  654. <!-- 脚本 -->
  655. {block name="script"}
  656. <script src="https://cdn.staticfile.org/echarts/5.3.0/echarts.min.js"></script>
  657. <script>
  658. //console.log($home_five);
  659. const moduleInit = ['tool'];
  660. function gouguInit() {
  661. var table = layui.table,
  662. tool = layui.tool,
  663. form = layui.form;
  664. var allcount;
  665. //审核表格
  666. layui.pageTable = table.render({
  667. elem: '#cost_project',
  668. title: '待审核任务',
  669. // toolbar: '#toolbarDemo',
  670. url: '/admin/project.audit/proprietor_list',
  671. page: false,
  672. limit: 20,
  673. cellMinWidth: 80,
  674. parseData: function(res) { // 数据解析回调函数
  675. // 在这里可以获取数据总数
  676. allcount = res.count;
  677. return {
  678. code: res.code, // 数据状态码
  679. msg: res.msg, // 状态信息
  680. count: res.count, // 数据总数
  681. data: res.data // 当前页数据
  682. };
  683. },
  684. cols: [
  685. [
  686. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  687. templet: function(d){
  688. return allcount - (d.LAY_NUM-1);
  689. }
  690. }, {
  691. field: 'project_status',
  692. title: '项目状态',
  693. align: 'center',
  694. width: 100,
  695. templet: function (item) {
  696. var html = '';
  697. if (item.project_status === 2) {
  698. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  699. } else if (item.project_status === 6) {
  700. html = '<span class="layui-badge layui-bg-blue">归档中</span> ';
  701. } else if (item.project_status === 7) {
  702. html = '<span class="layui-badge layui-bg-blue">退审中</span> ';
  703. } else if (item.project_status === 5) {
  704. html = '<span class="layui-badge layui-bg-blue">作业中</span> ';
  705. }
  706. return html;
  707. }
  708. }, {
  709. field: 'audit_status',
  710. title: '审批状态',
  711. align: 'center',
  712. width: 100,
  713. templet: function (item) {
  714. var html = '';
  715. if (item.audit_status === 1) {
  716. html = '<span class="layui-badge layui-bg-blue">待审核</span> ';
  717. } else if (item.audit_status === 2) {
  718. html = '<span class="layui-badge layui-bg-green">已通过</span> ';
  719. } else if (item.audit_status === 3) {
  720. html = '<span class="layui-badge layui-bg-red">已拒绝</span> ';
  721. }
  722. return html;
  723. }
  724. }, {
  725. field: 'project_name',
  726. title: '项目名称',
  727. align: 'center',
  728. width: 400
  729. }, {
  730. field: 'project_type',
  731. title: '项目类型',
  732. align: 'center',
  733. width: 100
  734. }, {
  735. field: 'audit_name',
  736. title: '流程名称',
  737. align: 'center',
  738. width: 150
  739. }, {
  740. field: 'sponsor',
  741. title: '发起人',
  742. align: 'center',
  743. width: 150
  744. }, {
  745. field: 'sponsor_unit',
  746. title: '发起单位/部门',
  747. align: 'center',
  748. width: 200
  749. }, {
  750. field: 'create_time',
  751. title: '发起时间',
  752. align: 'center',
  753. width: 150
  754. }, {
  755. field: 'approver_name',
  756. title: '审批人',
  757. align: 'center',
  758. width: 150
  759. }, {
  760. field: 'update_time',
  761. title: '审批时间',
  762. align: 'center',
  763. width: 150
  764. }, {
  765. field: 'remark',
  766. title: '审批原因',
  767. align: 'center',
  768. width: 150
  769. }, {
  770. fixed: 'right',
  771. field: 'right',
  772. title: '操作',
  773. width: 136,
  774. align: 'center',
  775. templet: function (item) {
  776. var h = '';
  777. if (item.audit_status === 1) {
  778. 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>'
  779. } else {
  780. h = '<div class="layui-btn-group"> <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a></div>'
  781. }
  782. return h;
  783. }
  784. }]
  785. ]
  786. });
  787. var abc = 0;
  788. ////审核表格 监听表格行工具事件
  789. table.on('tool(cost_project)', function (obj) {
  790. var data = obj.data;
  791. if (obj.event === 'read') {
  792. if (data.audit_type == 1) {
  793. tool.side('/admin/project.audit/read?id=' + data.project_id);
  794. } else if (data.audit_type == 2) {
  795. tool.side('/admin/project.report/view_proprietor?id=' + data.else_id);
  796. } else if (data.audit_type == 3) {
  797. tool.side(' /admin/project.contact/view?id=' + data.else_id);
  798. }else {
  799. layer.msg("审核内容不存在!")
  800. }
  801. // console.log(obj.data.getTrusteeName.institution)
  802. tool.side('/admin/project.audit/read?id=' + obj.data.project_id);
  803. } else if (obj.event === 'edit') {
  804. layer.confirm("确认是否审批通过?", function (index) {
  805. console.log(data)
  806. if (abc == 0) {
  807. let callback = function (e) {
  808. abc = 0
  809. layer.msg(e.msg);
  810. setTimeout(function () {
  811. window.location.reload()
  812. layer.close(index);
  813. }, 1000)
  814. }
  815. if (data.audit_type == 0) {
  816. //立项审批
  817. if (data.project_status == 0) {//业主端
  818. tool.post("/admin/project.audit/proprietor_agree", {
  819. id: data.id,
  820. else_id: data.else_id,
  821. audit_type: data.audit_type,
  822. project_id: data.project_id,
  823. project_status: data.project_status,
  824. }, callback);
  825. }
  826. }
  827. else if (data.audit_type == 1) {
  828. if (data.project_status == 0) {//业主端
  829. //立项审批
  830. tool.post("/admin/project.audit/proprietor_agree2", {
  831. id: data.id,
  832. else_id: data.else_id,
  833. audit_type: data.audit_type,
  834. project_id: data.project_id,
  835. project_status: data.project_status,
  836. }, callback);
  837. } else if (data.project_status == 6) {
  838. tool.post("/admin/project.audit/project_edit_second", {
  839. id: data.id,
  840. else_id: data.else_id,
  841. audit_type: data.audit_type,
  842. project_id: data.project_id,
  843. project_status: data.project_status,
  844. }, callback);
  845. } else if (data.project_status == 7) {
  846. //退审审批
  847. tool.post("/admin/project.audit/project_edit_third", {
  848. id: data.id,
  849. else_id: data.else_id,
  850. audit_type: data.audit_type,
  851. project_id: data.project_id,
  852. project_status: data.project_status,
  853. }, callback);
  854. }
  855. } else if (data.audit_type == 2) {
  856. if (data.else_status == 0) {
  857. //报告新建
  858. console.log(1)
  859. tool.post("/admin/project.report/proprietor_agree_report", {
  860. id: data.id,
  861. else_id: data.else_id,
  862. audit_type: data.audit_type,
  863. project_id: data.project_id,
  864. project_status: data.project_status,
  865. type: 1000,
  866. }, callback);
  867. } else if (data.else_status == 3) {
  868. //报告删除
  869. tool.post("/admin/project.report/proprietor_agree_delete", {
  870. id: data.id,
  871. else_id: data.else_id,
  872. audit_type: data.audit_type,
  873. project_id: data.project_id,
  874. project_status: data.project_status,
  875. type: 1000,
  876. }, callback);
  877. }
  878. } else if (data.audit_type == 3) {
  879. if (data.else_status == 0) {
  880. //联系函新建
  881. tool.post("/admin/project.contact/agree_contact", {
  882. id: data.id,
  883. else_id: data.else_id,
  884. audit_type: data.audit_type,
  885. project_id: data.project_id,
  886. project_status: data.project_status,
  887. type: 1000,
  888. }, callback);
  889. } else if (data.else_status == 3) {
  890. //联系函删除
  891. tool.post("/admin/project.contact/agree_delete", {
  892. id: data.id,
  893. else_id: data.else_id,
  894. audit_type: data.audit_type,
  895. project_id: data.project_id,
  896. project_status: data.project_status,
  897. type: 1000,
  898. }, callback);
  899. }
  900. }else{
  901. layer.msg("请联系管理员")
  902. }
  903. // console.log(abc, data.else_status)
  904. abc = 1;
  905. }
  906. }, function () {
  907. abc = 0;
  908. })
  909. } else if (obj.event === 'overrule') {
  910. layer.prompt({
  911. title: '请输入<span style="color: red">拒绝</span>原因',
  912. formType: 2,
  913. area: ['35vw', '15vw']
  914. }, function (text, index) {
  915. if (text == '') {
  916. layer.msg('请先完善拒绝原因');
  917. return false;
  918. } else {
  919. let callback = function (e) {
  920. layer.msg(e.msg);
  921. listount--;
  922. if (listount == 0) {
  923. parent.showhongdian()
  924. }
  925. setTimeout(function () {
  926. window.location.reload()
  927. layer.close(index);
  928. }, 2000)
  929. }
  930. if (data.audit_type == 1) {
  931. if (data.project_status == 2) {
  932. //立项
  933. tool.post("/admin/project.audit/project_overrule_first", {
  934. id: data.id,
  935. else_id: data.else_id,
  936. audit_type: data.audit_type,
  937. project_id: data.project_id,
  938. project_status: data.project_status,
  939. audit_remark: text,
  940. }, callback);
  941. } else if (data.project_status == 6) {
  942. //归档
  943. tool.post("/admin/project.audit/project_overrule_second", {
  944. id: data.id,
  945. else_id: data.else_id,
  946. audit_type: data.audit_type,
  947. project_id: data.project_id,
  948. project_status: data.project_status,
  949. audit_remark: text,
  950. }, callback);
  951. } else if (data.project_status == 7) {
  952. //退审
  953. tool.post("/admin/project.audit/project_overrule_third", {
  954. id: data.id,
  955. else_id: data.else_id,
  956. audit_type: data.audit_type,
  957. project_id: data.project_id,
  958. project_status: data.project_status,
  959. audit_remark: text,
  960. }, callback);
  961. }
  962. } else if (data.audit_type == 2) {
  963. if (data.else_status == 1) {
  964. //报告新建
  965. tool.post("/admin/project.report/proprietor_un_report", {
  966. id: data.id,
  967. else_id: data.else_id,
  968. audit_type: data.audit_type,
  969. project_id: data.project_id,
  970. project_status: data.project_status,
  971. audit_remark: text,
  972. type: 1000,
  973. }, callback);
  974. } else if (data.else_status == 4) {
  975. //报告删除
  976. tool.post("/admin/project.report/proprietor_un_delete", {
  977. id: data.id,
  978. else_id: data.else_id,
  979. audit_type: data.audit_type,
  980. project_id: data.project_id,
  981. project_status: data.project_status,
  982. audit_remark: text,
  983. type: 1000,
  984. }, callback);
  985. }
  986. } else if (data.audit_type == 3) {
  987. if (data.else_status == 0) {
  988. //联系函新建
  989. tool.post("/admin/project.contact/un_contact", {
  990. id: data.id,
  991. else_id: data.else_id,
  992. audit_type: data.audit_type,
  993. project_id: data.project_id,
  994. project_status: data.project_status,
  995. audit_remark: text,
  996. type: 1000,
  997. }, callback);
  998. } else if (data.else_status == 3) {
  999. //联系函删除
  1000. tool.post("/admin/project.contact/un_delete", {
  1001. id: data.id,
  1002. else_id: data.else_id,
  1003. audit_type: data.audit_type,
  1004. project_id: data.project_id,
  1005. project_status: data.project_status,
  1006. audit_remark: text,
  1007. type: 1000,
  1008. }, callback);
  1009. }
  1010. }
  1011. else{
  1012. layer.msg("请联系管理员")
  1013. }
  1014. }
  1015. })
  1016. }
  1017. return false;
  1018. });
  1019. //临期表格
  1020. layui.pageTable = table.render({
  1021. elem: '#advent_project',
  1022. title: '临期项目',
  1023. url: '/admin/project.cost_proprietor/list',
  1024. page: false,
  1025. limit: 20,
  1026. cellMinWidth: 80,
  1027. parseData: function(res) { // 数据解析回调函数
  1028. // 在这里可以获取数据总数
  1029. allcount = res.count;
  1030. return {
  1031. code: res.code, // 数据状态码
  1032. msg: res.msg, // 状态信息
  1033. count: res.count, // 数据总数
  1034. data: res.data // 当前页数据
  1035. };
  1036. },
  1037. cols: [
  1038. [
  1039. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1040. templet: function(d){
  1041. return allcount - (d.LAY_NUM-1);
  1042. }
  1043. }, {
  1044. field: 'project_status',
  1045. title: '项目状态',
  1046. align: 'center',
  1047. width: 100,
  1048. templet: function (item) {
  1049. var html = '';
  1050. if (item.project_status === 1) {
  1051. html = '<span class="layui-badge layui-bg-orange">立项中</span> ';
  1052. } else if (item.project_status === 2) {
  1053. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  1054. } else if (item.project_status === -1) {
  1055. html = '<span class="layui-badge layui-bg-red">待修改</span> ';
  1056. } else if (item.project_status === 3) {
  1057. html = '<span class="layui-badge layui-bg-green">待接收</span> ';
  1058. } else if (item.project_status === 4) {
  1059. html =
  1060. '<span class="layui-badge" style="background-color: #31bdec">分配中</span> ';
  1061. } else if (item.project_status === 5) {
  1062. html =
  1063. '<span class="layui-badge" style="background-color: #31bdec">作业中</span> ';
  1064. } else if (item.project_status === 6) {
  1065. html =
  1066. '<span class="layui-badge" style="background-color: #31bdec">归档中</span> ';
  1067. } else if (item.project_status === 7) {
  1068. html =
  1069. '<span class="layui-badge" style="background-color: #31bdec">退审中</span> ';
  1070. } else if (item.project_status === 8) {
  1071. html =
  1072. '<span class="layui-badge" style="background-color: #31bdec">已归档</span> ';
  1073. } else if (item.project_status === 9) {
  1074. html =
  1075. '<span class="layui-badge" style="background-color: #31bdec">已退审</span> ';
  1076. }
  1077. return html;
  1078. }
  1079. }, {
  1080. field: 'project_name',
  1081. title: '项目名称',
  1082. align: 'center',
  1083. }, {
  1084. field: 'project_num',
  1085. title: '项目编号',
  1086. align: 'center',
  1087. }, {
  1088. field: 'project_time',
  1089. title: '剩余时间',
  1090. align: 'center',
  1091. width: 100,
  1092. templet: function (item) {
  1093. let outcome = Math.round(new Date().getTime() / 1000).toString();
  1094. var advent_time = item.project_end_time - outcome
  1095. // console.log(advent_time);
  1096. function getDuration(second) {
  1097. var duration
  1098. var days = Math.floor(second / 86400);
  1099. var hours = Math.floor((second % 86400) / 3600);
  1100. var minutes = Math.floor(((second % 86400) % 3600) / 60);
  1101. var seconds = Math.floor(((second % 86400) % 3600) % 60);
  1102. if (days > 0) duration = days + "天";
  1103. else if (hours > 0) duration = hours + "小时";
  1104. else if (minutes > 0) duration = minutes + "分";
  1105. else if (seconds > 0) duration = seconds + "秒";
  1106. return duration;
  1107. }
  1108. return getDuration(advent_time);
  1109. }
  1110. },
  1111. {
  1112. fixed: 'right',
  1113. field: 'right',
  1114. title: '操作',
  1115. width: 136,
  1116. align: 'center',
  1117. templet: function (a) {
  1118. var h = '';
  1119. var arr = [3, 4, 5];
  1120. if (a.self_id == a.entrust_maker) {
  1121. if (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><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1123. } else if (arr.indexOf(a.project_status) !== -1) {
  1124. 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>'
  1125. } else {
  1126. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1127. }
  1128. } else {
  1129. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1130. }
  1131. return h;
  1132. }
  1133. }
  1134. ]
  1135. ]
  1136. });
  1137. //临期表格监听表格行工具事件
  1138. table.on('tool(advent_project)', function (obj) {
  1139. var data = obj.data;
  1140. if (obj.event === 'read') {
  1141. tool.side('/admin/project.cost_proprietor/read?id=' + obj.data.id);
  1142. } else if (obj.event === 'edit') {
  1143. tool.side('/admin/project.cost_proprietor/edit?id=' + obj.data.id);
  1144. } else if (obj.event === 'del') {
  1145. layer.confirm('确定要删除该记录吗?', {
  1146. icon: 3,
  1147. title: '提示'
  1148. }, function (index) {
  1149. if (data.project_status < 3) {
  1150. let callback = function (e) {
  1151. layer.msg(e.msg);
  1152. if (e.code == 0) {
  1153. obj.del();
  1154. }
  1155. }
  1156. tool.delete("/admin/project.cost_proprietor/del", {
  1157. id: data.id
  1158. }, callback);
  1159. layer.close(index);
  1160. }
  1161. layer.msg("已审核,无法删除");
  1162. });
  1163. }
  1164. return false;
  1165. });
  1166. //逾期表格
  1167. layui.pageTable = table.render({
  1168. elem: '#late_project',
  1169. title: '逾期项目',
  1170. url: '/admin/project.cost_proprietor/list2',
  1171. page: false,
  1172. limit: 20,
  1173. cellMinWidth: 80,
  1174. parseData: function(res) { // 数据解析回调函数
  1175. // 在这里可以获取数据总数
  1176. allcount = res.count;
  1177. return {
  1178. code: res.code, // 数据状态码
  1179. msg: res.msg, // 状态信息
  1180. count: res.count, // 数据总数
  1181. data: res.data // 当前页数据
  1182. };
  1183. },
  1184. cols: [
  1185. [
  1186. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1187. templet: function(d){
  1188. return allcount - (d.LAY_NUM-1);
  1189. }
  1190. }, {
  1191. field: 'project_status',
  1192. title: '项目状态',
  1193. align: 'center',
  1194. width: 100,
  1195. templet: function (item) {
  1196. var html = '';
  1197. if (item.project_status === 1) {
  1198. html = '<span class="layui-badge layui-bg-orange">立项中</span> ';
  1199. } else if (item.project_status === 2) {
  1200. html = '<span class="layui-badge layui-bg-blue">审批中</span> ';
  1201. } else if (item.project_status === -1) {
  1202. html = '<span class="layui-badge layui-bg-red">待修改</span> ';
  1203. } else if (item.project_status === 3) {
  1204. html = '<span class="layui-badge layui-bg-green">待接收</span> ';
  1205. } else if (item.project_status === 4) {
  1206. html =
  1207. '<span class="layui-badge" style="background-color: #31bdec">分配中</span> ';
  1208. } else if (item.project_status === 5) {
  1209. html =
  1210. '<span class="layui-badge" style="background-color: #31bdec">作业中</span> ';
  1211. } else if (item.project_status === 6) {
  1212. html =
  1213. '<span class="layui-badge" style="background-color: #31bdec">归档中</span> ';
  1214. } else if (item.project_status === 7) {
  1215. html =
  1216. '<span class="layui-badge" style="background-color: #31bdec">退审中</span> ';
  1217. } else if (item.project_status === 8) {
  1218. html =
  1219. '<span class="layui-badge" style="background-color: #31bdec">已归档</span> ';
  1220. } else if (item.project_status === 9) {
  1221. html =
  1222. '<span class="layui-badge" style="background-color: #31bdec">已退审</span> ';
  1223. }
  1224. return html;
  1225. }
  1226. }, {
  1227. field: 'project_name',
  1228. title: '项目名称',
  1229. align: 'center',
  1230. }, {
  1231. field: 'project_num',
  1232. title: '项目编号',
  1233. align: 'center',
  1234. }, {
  1235. field: 'project_time',
  1236. title: '逾期时间',
  1237. align: 'center',
  1238. width: 100,
  1239. templet: function (item) {
  1240. let outcome = Math.round(new Date().getTime() / 1000).toString();
  1241. var advent_time = item.project_end_time - outcome
  1242. var time = getDuration(advent_time);
  1243. var timestr = "<span style='color: green'>" + "剩余" + time + "</span>";
  1244. if (advent_time < 0) {
  1245. advent_time = -advent_time;
  1246. time = getDuration(advent_time);
  1247. timestr = "<span style='color: red'>" + "逾期" + time + "</span>";
  1248. }
  1249. var html;
  1250. html =
  1251. "<div>" + timestr + "</div>";
  1252. function getDuration(second) {
  1253. var duration
  1254. var days = Math.floor(second / 86400);
  1255. var hours = Math.floor((second % 86400) / 3600);
  1256. if (days > 0) duration = days + "天";
  1257. else if (hours > 0) duration = "不足一天";
  1258. else if (hours == 0) duration = "不足一天";
  1259. return duration;
  1260. }
  1261. return html;
  1262. }
  1263. },
  1264. {
  1265. fixed: 'right',
  1266. field: 'right',
  1267. title: '操作',
  1268. width: 136,
  1269. align: 'center',
  1270. templet: function (a) {
  1271. var h = '';
  1272. var arr = [3, 4, 5];
  1273. if (a.self_id == a.entrust_maker) {
  1274. if (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><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1276. } else if (arr.indexOf(a.project_status) !== -1) {
  1277. 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>'
  1278. } else {
  1279. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1280. }
  1281. } else {
  1282. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1283. }
  1284. return h;
  1285. }
  1286. }
  1287. ]
  1288. ]
  1289. });
  1290. //逾期表格
  1291. table.on('tool(late_project)', function (obj) {
  1292. var data = obj.data;
  1293. if (obj.event === 'read') {
  1294. tool.side('/admin/project.cost_proprietor/read?id=' + obj.data.id);
  1295. } else if (obj.event === 'edit') {
  1296. tool.side('/admin/project.cost_proprietor/edit?id=' + obj.data.id);
  1297. } else if (obj.event === 'del') {
  1298. layer.confirm('确定要删除该记录吗?', {
  1299. icon: 3,
  1300. title: '提示'
  1301. }, function (index) {
  1302. if (data.project_status < 3) {
  1303. let callback = function (e) {
  1304. layer.msg(e.msg);
  1305. if (e.code == 0) {
  1306. obj.del();
  1307. }
  1308. }
  1309. tool.delete("/admin/project._proprietor/del", {
  1310. id: data.id
  1311. }, callback);
  1312. layer.close(index);
  1313. }
  1314. layer.msg("已审核,无法删除");
  1315. });
  1316. }
  1317. return false;
  1318. });
  1319. layui.project2Table = table.render({
  1320. elem: '#cost_project2',
  1321. title: '造价项目列表',
  1322. //toolbar: '#toolbarDemo',
  1323. url: '/admin/project.cost_proprietor/datalist',
  1324. limit: 20,
  1325. parseData: function(res) { // 数据解析回调函数
  1326. // 在这里可以获取数据总数
  1327. allcount = res.count;
  1328. return {
  1329. code: res.code, // 数据状态码
  1330. msg: res.msg, // 状态信息
  1331. count: res.count, // 数据总数
  1332. data: res.data // 当前页数据
  1333. };
  1334. },
  1335. cols: [
  1336. [
  1337. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1338. templet: function(d){
  1339. return allcount - (d.LAY_NUM-1);
  1340. }
  1341. },
  1342. {
  1343. field: 'project_status',
  1344. title: '项目状态',
  1345. align: 'center',
  1346. width: 100,
  1347. templet: function (item) {
  1348. var html = '';
  1349. if (item.project_status === 1) {
  1350. html = '<span class="layui-badge layui-bg-orange" style="background-color: #ffb800">立项中</span> ';
  1351. } else if (item.project_status === 2) {
  1352. html = '<span class="layui-badge layui-bg-blue" style="background-color: #b30095">审批中</span> ';
  1353. } else if (item.project_status === -1) {
  1354. html = '<span class="layui-badge layui-bg-red" style="background-color: #5825aa">待修改</span> ';
  1355. } else if (item.project_status === 3) {
  1356. html = '<span class="layui-badge layui-bg-green" style="background-color: #d37000">待接收</span> ';
  1357. } else if (item.project_status === 4) {
  1358. html = '<span class="layui-badge" style="background-color: #005fa8">分配中</span> ';
  1359. } else if (item.project_status === 5) {
  1360. html = '<span class="layui-badge layui-bg-blue" style="background-color: #1e9fff">作业中</span> ';
  1361. } else if (item.project_status === 6) {
  1362. html = '<span class="layui-badge" style="background-color: #007244">归档中</span> ';
  1363. } else if (item.project_status === 7) {
  1364. html = '<span class="layui-badge" style="background-color: #881f1f">退审中</span> ';
  1365. } else if (item.project_status === 8) {
  1366. html = '<span class="layui-badge" style="background-color: #16b777">已归档</span> ';
  1367. } else if (item.project_status === 9) {
  1368. html = '<span class="layui-badge" style="background-color: #d81e06">已退审</span> ';
  1369. }
  1370. return html;
  1371. }
  1372. },
  1373. {
  1374. field: 'project_name',
  1375. title: '项目名称',
  1376. align: 'center',
  1377. width: 400
  1378. }, {
  1379. field: 'project_num',
  1380. title: '项目编号',
  1381. align: 'center',
  1382. width: 200
  1383. }, {
  1384. field: 'project_time',
  1385. title: '项目周期',
  1386. align: 'center',
  1387. width: 300,
  1388. templet: function (item) {
  1389. var html;
  1390. html =
  1391. "<div>" +
  1392. layui.util.toDateString(item.project_start_time * 1000, 'yyyy-MM-dd') +
  1393. "~" +
  1394. layui.util.toDateString(item.project_end_time * 1000, 'yyyy-MM-dd') +
  1395. "</div>";
  1396. return html;
  1397. }
  1398. }, {
  1399. field: 'entrust_unit_name',
  1400. title: '委托单位',
  1401. align: 'center',
  1402. width: 150
  1403. }, {
  1404. field: 'entrust_head',
  1405. title: '委托单位负责人',
  1406. align: 'center',
  1407. width: 200
  1408. }, {
  1409. field: 'entrust_head_phone',
  1410. title: '委托单位负责人电话',
  1411. align: 'center',
  1412. width: 250
  1413. }, {
  1414. fixed: 'right',
  1415. field: 'right',
  1416. title: '操作',
  1417. width: 136,
  1418. align: 'center',
  1419. templet: function (a) {
  1420. var h = '';
  1421. // 1全部-可查看可编辑,2全部-可查看,0与我有关
  1422. // console.log(a.self_id);
  1423. if(a.self_id == 1){
  1424. if(a.project_status==1){
  1425. 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>'
  1426. } else {
  1427. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1428. }
  1429. }else if(a.self_id == 2){
  1430. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a></div>'
  1431. }else if(a.self_id == 0 || a.self_id == 3){
  1432. if(a.project_status==1){
  1433. 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>'
  1434. } else {
  1435. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1436. }
  1437. }
  1438. return h;
  1439. }
  1440. }]
  1441. ]
  1442. });
  1443. table.on('tool(cost_project2)', function (obj) {
  1444. var data = obj.data;
  1445. if (obj.event === 'read') {
  1446. tool.side('/admin/project.cost_proprietor/read?id=' + obj.data.id);
  1447. } else if (obj.event === 'edit') {
  1448. if (obj.data.project_status<6) {
  1449. tool.side('/admin/project.cost_proprietor/edit?id=' + obj.data.id);
  1450. }else {
  1451. layer.msg("已归档/已退审")
  1452. }
  1453. } else if (obj.event === 'del') {
  1454. layer.confirm('确定要删除该记录吗?', {
  1455. icon: 3,
  1456. title: '提示'
  1457. }, function (index) {
  1458. if (data.project_status == 1) {
  1459. let callback = function (e) {
  1460. layer.msg(e.msg);
  1461. if (e.code == 0) {
  1462. obj.del();
  1463. }
  1464. }
  1465. tool.delete("/admin/project.cost_proprietor/del", {id: data.id}, callback);
  1466. layer.close(index);
  1467. }else {
  1468. layer.msg("已审核,无法删除");
  1469. }
  1470. });
  1471. }
  1472. return false;
  1473. });
  1474. layui.headTable = table.render({
  1475. elem: '#head',
  1476. title: '通讯录外部',
  1477. url: '/admin/index/head',
  1478. page: false,
  1479. limit: 20,
  1480. parseData: function(res) { // 数据解析回调函数
  1481. // 在这里可以获取数据总数
  1482. allcount = res.count;
  1483. return {
  1484. code: res.code, // 数据状态码
  1485. msg: res.msg, // 状态信息
  1486. count: res.count, // 数据总数
  1487. data: res.data // 当前页数据
  1488. };
  1489. },
  1490. cols: [
  1491. [
  1492. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1493. templet: function(d){
  1494. return allcount - (d.LAY_NUM-1);
  1495. }
  1496. }, {
  1497. field: 'title',
  1498. title: '公司名称',
  1499. align: 'center',
  1500. }, {
  1501. field: 'nickname',
  1502. title: '联系人',
  1503. align: 'center',
  1504. }, {
  1505. field: 'mobile',
  1506. title: '电话',
  1507. align: 'center',
  1508. }, {
  1509. field: 'email',
  1510. title: '电子邮箱',
  1511. align: 'center',
  1512. },
  1513. ]
  1514. ]
  1515. });
  1516. layui.peopleTable = table.render({
  1517. elem: '#people',
  1518. title: '通讯录内部',
  1519. //toolbar: '#toolbarDemo',
  1520. url: '/admin/index/people',
  1521. limit: 20,
  1522. parseData: function(res) { // 数据解析回调函数
  1523. // 在这里可以获取数据总数
  1524. allcount = res.count;
  1525. return {
  1526. code: res.code, // 数据状态码
  1527. msg: res.msg, // 状态信息
  1528. count: res.count, // 数据总数
  1529. data: res.data // 当前页数据
  1530. };
  1531. },
  1532. cols: [
  1533. [{fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1534. templet: function(d){
  1535. return allcount - (d.LAY_NUM-1);
  1536. }
  1537. }, {
  1538. field: 'nickname',
  1539. title: '联系人',
  1540. align: 'center',
  1541. }, {
  1542. field: 'mobile',
  1543. title: '电话',
  1544. align: 'center',
  1545. }, {
  1546. field: 'email',
  1547. title: '电子邮箱',
  1548. align: 'center',
  1549. }]
  1550. ]
  1551. });
  1552. //监听搜索提交
  1553. form.on('submit(webform)', function (data) {
  1554. layui.peopleTable.reload({
  1555. where: {
  1556. nickname: data.field.nickname
  1557. },
  1558. });
  1559. return false;
  1560. });
  1561. form.on('submit(webform2)', function (data) {
  1562. layui.headTable.reload({
  1563. where: {
  1564. nickname: data.field.nickname2
  1565. },
  1566. });
  1567. return false;
  1568. });
  1569. form.on('submit(project-search)', function (data) {
  1570. layui.project2Table.reload({
  1571. where: data.field,
  1572. });
  1573. return false;
  1574. });
  1575. layui.use(function () {
  1576. var layer = layui.layer;
  1577. var form = layui.form;
  1578. var laydate = layui.laydate;
  1579. var util = layui.util;
  1580. laydate.render({
  1581. elem: '#test2',
  1582. position: 'static',
  1583. theme: '#1A75FF',
  1584. calendar: 'true',
  1585. showBottom: false,
  1586. });
  1587. });
  1588. }
  1589. </script>
  1590. <!--显示实时年份-->
  1591. <script>
  1592. `use strict`
  1593. var datetime = new Date().getFullYear();
  1594. // console.log(datetime); // it will represent date in the console of developers tool
  1595. document.getElementById("time1").textContent = datetime; //it will print on html page
  1596. document.getElementById("time2").textContent = datetime;
  1597. </script>
  1598. {/block}
  1599. <!-- /脚本 -->