main.html 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923
  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. if(advent_time > 30){
  1245. timestr = "<span style='color: red'>" + "待归档" + "</span>"
  1246. }else{
  1247. time = getDuration(advent_time);
  1248. timestr = "<span style='color: red'>" + "逾期" + time + "</span>";
  1249. }
  1250. }
  1251. var html;
  1252. html =
  1253. "<div>" + timestr + "</div>";
  1254. function getDuration(second) {
  1255. var duration
  1256. var days = Math.floor(second / 86400);
  1257. var hours = Math.floor((second % 86400) / 3600);
  1258. if (days > 0) duration = days + "天";
  1259. else if (hours > 0) duration = "不足一天";
  1260. else if (hours == 0) duration = "不足一天";
  1261. return duration;
  1262. }
  1263. return html;
  1264. }
  1265. },
  1266. {
  1267. fixed: 'right',
  1268. field: 'right',
  1269. title: '操作',
  1270. width: 136,
  1271. align: 'center',
  1272. templet: function (a) {
  1273. var h = '';
  1274. var arr = [3, 4, 5];
  1275. if (a.self_id == a.entrust_maker) {
  1276. if (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><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
  1278. } else if (arr.indexOf(a.project_status) !== -1) {
  1279. 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>'
  1280. } else {
  1281. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1282. }
  1283. } else {
  1284. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><div'
  1285. }
  1286. return h;
  1287. }
  1288. }
  1289. ]
  1290. ]
  1291. });
  1292. //逾期表格
  1293. table.on('tool(late_project)', function (obj) {
  1294. var data = obj.data;
  1295. if (obj.event === 'read') {
  1296. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1297. } else if (obj.event === 'edit') {
  1298. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1299. } else if (obj.event === 'del') {
  1300. layer.confirm('确定要删除该记录吗?', {
  1301. icon: 3,
  1302. title: '提示'
  1303. }, function (index) {
  1304. if (data.project_status < 3) {
  1305. let callback = function (e) {
  1306. layer.msg(e.msg);
  1307. if (e.code == 0) {
  1308. obj.del();
  1309. }
  1310. }
  1311. tool.delete("/admin/project.cost/del", {
  1312. id: data.id
  1313. }, callback);
  1314. layer.close(index);
  1315. }
  1316. layer.msg("已审核,无法删除");
  1317. });
  1318. }
  1319. return false;
  1320. });
  1321. layui.project2Table = table.render({
  1322. elem: '#cost_project2',
  1323. title: '造价项目列表',
  1324. //toolbar: '#toolbarDemo',
  1325. url: '/admin/project.cost/datalist',
  1326. limit: 20,
  1327. parseData: function(res) { // 数据解析回调函数
  1328. // 在这里可以获取数据总数
  1329. allcount = res.count;
  1330. return {
  1331. code: res.code, // 数据状态码
  1332. msg: res.msg, // 状态信息
  1333. count: res.count, // 数据总数
  1334. data: res.data // 当前页数据
  1335. };
  1336. },
  1337. cols: [
  1338. [
  1339. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1340. templet: function(d){
  1341. return allcount - (d.LAY_NUM-1);
  1342. }
  1343. },
  1344. {
  1345. field: 'project_status',
  1346. title: '项目状态',
  1347. align: 'center',
  1348. width: 100,
  1349. templet: function (item) {
  1350. var html = '';
  1351. if (item.project_status === 1) {
  1352. html = '<span class="layui-badge layui-bg-orange" style="background-color: #ffb800">立项中</span> ';
  1353. } else if (item.project_status === 2) {
  1354. html = '<span class="layui-badge layui-bg-blue" style="background-color: #b30095">审批中</span> ';
  1355. } else if (item.project_status === -1) {
  1356. html = '<span class="layui-badge layui-bg-red" style="background-color: #5825aa">待修改</span> ';
  1357. } else if (item.project_status === 3) {
  1358. html = '<span class="layui-badge layui-bg-green" style="background-color: #d37000">待接收</span> ';
  1359. } else if (item.project_status === 4) {
  1360. html = '<span class="layui-badge" style="background-color: #005fa8">分配中</span> ';
  1361. } else if (item.project_status === 5) {
  1362. html = '<span class="layui-badge layui-bg-blue" style="background-color: #1e9fff">作业中</span> ';
  1363. } else if (item.project_status === 6) {
  1364. html = '<span class="layui-badge" style="background-color: #007244">归档中</span> ';
  1365. } else if (item.project_status === 7) {
  1366. html = '<span class="layui-badge" style="background-color: #881f1f">退审中</span> ';
  1367. } else if (item.project_status === 8) {
  1368. html = '<span class="layui-badge" style="background-color: #16b777">已归档</span> ';
  1369. } else if (item.project_status === 9) {
  1370. html = '<span class="layui-badge" style="background-color: #d81e06">已退审</span> ';
  1371. }
  1372. return html;
  1373. }
  1374. },
  1375. {
  1376. field: 'project_name',
  1377. title: '项目名称',
  1378. align: 'center',
  1379. width: 400
  1380. }, {
  1381. field: 'project_num',
  1382. title: '项目编号',
  1383. align: 'center',
  1384. width: 200
  1385. }, {
  1386. field: 'project_time',
  1387. title: '项目周期',
  1388. align: 'center',
  1389. width: 300,
  1390. templet: function (item) {
  1391. var html;
  1392. html =
  1393. "<div>" +
  1394. layui.util.toDateString(item.project_start_time * 1000, 'yyyy-MM-dd') +
  1395. "~" +
  1396. layui.util.toDateString(item.project_end_time * 1000, 'yyyy-MM-dd') +
  1397. "</div>";
  1398. return html;
  1399. }
  1400. }, {
  1401. field: 'entrust_unit_name',
  1402. title: '委托单位',
  1403. align: 'center',
  1404. width: 150
  1405. }, {
  1406. field: 'entrust_head',
  1407. title: '委托单位负责人',
  1408. align: 'center',
  1409. width: 200
  1410. }, {
  1411. field: 'entrust_head_phone',
  1412. title: '委托单位负责人电话',
  1413. align: 'center',
  1414. width: 250
  1415. }, {
  1416. fixed: 'right',
  1417. field: 'right',
  1418. title: '操作',
  1419. width: 136,
  1420. align: 'center',
  1421. templet: function (a) {
  1422. var h = '';
  1423. // 1全部-可查看可编辑,2全部-可查看,0与我有关
  1424. // console.log(a.self_id);
  1425. if(a.self_id == 1){
  1426. if(a.project_status==1){
  1427. 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>'
  1428. } else {
  1429. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1430. }
  1431. }else if(a.self_id == 2){
  1432. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a></div>'
  1433. }else if(a.self_id == 0 || a.self_id == 3){
  1434. if(a.project_status==1){
  1435. 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>'
  1436. } else {
  1437. h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
  1438. }
  1439. }
  1440. return h;
  1441. }
  1442. }]
  1443. ]
  1444. });
  1445. table.on('tool(cost_project2)', function (obj) {
  1446. var data = obj.data;
  1447. if (obj.event === 'read') {
  1448. tool.side('/admin/project.cost/read?id=' + obj.data.id);
  1449. } else if (obj.event === 'edit') {
  1450. if (obj.data.project_status<6) {
  1451. tool.side('/admin/project.cost/edit?id=' + obj.data.id);
  1452. }else {
  1453. layer.msg("已归档/已退审")
  1454. }
  1455. } else if (obj.event === 'del') {
  1456. layer.confirm('确定要删除该记录吗?', {
  1457. icon: 3,
  1458. title: '提示'
  1459. }, function (index) {
  1460. if (data.project_status == 1) {
  1461. let callback = function (e) {
  1462. layer.msg(e.msg);
  1463. if (e.code == 0) {
  1464. obj.del();
  1465. }
  1466. }
  1467. tool.delete("/admin/project.cost/del", {id: data.id}, callback);
  1468. layer.close(index);
  1469. }else {
  1470. layer.msg("已审核,无法删除");
  1471. }
  1472. });
  1473. }
  1474. return false;
  1475. });
  1476. layui.headTable = table.render({
  1477. elem: '#head',
  1478. title: '通讯录外部',
  1479. url: '/admin/index/head',
  1480. page: false,
  1481. limit: 20,
  1482. parseData: function(res) { // 数据解析回调函数
  1483. // 在这里可以获取数据总数
  1484. allcount = res.count;
  1485. return {
  1486. code: res.code, // 数据状态码
  1487. msg: res.msg, // 状态信息
  1488. count: res.count, // 数据总数
  1489. data: res.data // 当前页数据
  1490. };
  1491. },
  1492. cols: [
  1493. [
  1494. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1495. templet: function(d){
  1496. return allcount - (d.LAY_NUM-1);
  1497. }
  1498. }, {
  1499. field: 'title',
  1500. title: '公司名称',
  1501. align: 'center',
  1502. }, {
  1503. field: 'nickname',
  1504. title: '联系人',
  1505. align: 'center',
  1506. }, {
  1507. field: 'mobile',
  1508. title: '电话',
  1509. align: 'center',
  1510. }, {
  1511. field: 'email',
  1512. title: '电子邮箱',
  1513. align: 'center',
  1514. },
  1515. ]
  1516. ]
  1517. });
  1518. layui.peopleTable = table.render({
  1519. elem: '#people',
  1520. title: '通讯录内部',
  1521. //toolbar: '#toolbarDemo',
  1522. url: '/admin/index/people',
  1523. limit: 20,
  1524. parseData: function(res) { // 数据解析回调函数
  1525. // 在这里可以获取数据总数
  1526. allcount = res.count;
  1527. return {
  1528. code: res.code, // 数据状态码
  1529. msg: res.msg, // 状态信息
  1530. count: res.count, // 数据总数
  1531. data: res.data // 当前页数据
  1532. };
  1533. },
  1534. cols: [
  1535. [{fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  1536. templet: function(d){
  1537. return allcount - (d.LAY_NUM-1);
  1538. }
  1539. }, {
  1540. field: 'nickname',
  1541. title: '联系人',
  1542. align: 'center',
  1543. }, {
  1544. field: 'mobile',
  1545. title: '电话',
  1546. align: 'center',
  1547. }, {
  1548. field: 'email',
  1549. title: '电子邮箱',
  1550. align: 'center',
  1551. }]
  1552. ]
  1553. });
  1554. //监听搜索提交
  1555. form.on('submit(webform)', function (data) {
  1556. layui.peopleTable.reload({
  1557. where: {
  1558. nickname: data.field.nickname
  1559. },
  1560. });
  1561. return false;
  1562. });
  1563. form.on('submit(webform2)', function (data) {
  1564. layui.headTable.reload({
  1565. where: {
  1566. nickname: data.field.nickname2
  1567. },
  1568. });
  1569. return false;
  1570. });
  1571. form.on('submit(project-search)', function (data) {
  1572. layui.project2Table.reload({
  1573. where: data.field,
  1574. });
  1575. return false;
  1576. });
  1577. layui.use(function () {
  1578. var layer = layui.layer;
  1579. var form = layui.form;
  1580. var laydate = layui.laydate;
  1581. var util = layui.util;
  1582. laydate.render({
  1583. elem: '#test2',
  1584. position: 'static',
  1585. theme: '#1A75FF',
  1586. calendar: 'true',
  1587. showBottom: false,
  1588. });
  1589. });
  1590. }
  1591. </script>
  1592. <!--显示实时年份-->
  1593. <script>
  1594. `use strict`
  1595. var datetime = new Date().getFullYear();
  1596. // console.log(datetime); // it will represent date in the console of developers tool
  1597. document.getElementById("time1").textContent = datetime; //it will print on html page
  1598. document.getElementById("time2").textContent = datetime;
  1599. </script>
  1600. {/block}
  1601. <!-- /脚本 -->