project_overview.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <style>
  8. .attachment{
  9. overflow-y: auto;
  10. display: -webkit-box;
  11. -webkit-overflow-scrolling: touch;
  12. }
  13. .attachment li{
  14. padding: 0.5vw 0.7vw 0.5vw 0.7vw;
  15. white-space: nowrap;
  16. display: inline-block;
  17. border-right: 1px solid #e2e2e2;
  18. }
  19. .attachment p{
  20. margin: 3px 0 5px 0;
  21. width: 11vw;
  22. overflow: hidden;
  23. text-overflow: ellipsis;
  24. text-align: center;
  25. }
  26. /* #filesBox li{
  27. width: 145px;
  28. } */
  29. .heading th, .form th{
  30. height: 54.8px;
  31. }
  32. .report-title{
  33. height: 54.8px;
  34. }
  35. .report-title th{
  36. padding-left: 15px;
  37. border: 1px solid #e2e2e2;
  38. font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
  39. }
  40. .heading th{
  41. border: 1px solid #e2e2e2;
  42. }
  43. .form th{
  44. border: 1px solid #e2e2e2;
  45. }
  46. #filesBox2 .layui-table-tool{
  47. display: none;
  48. }
  49. #filesBox2 .layui-table-view .layui-table{
  50. width: 100% !important;
  51. }
  52. #filesBox2 .layui-table-cell{
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. }
  57. .laytable-cell-1-0-1, .laytable-cell-1-0-2{
  58. justify-content: flex-start !important;
  59. }
  60. .laytable-cell-1-0-0 span, .laytable-cell-1-0-1 span, .laytable-cell-1-0-2 span, .laytable-cell-1-0-3 span, .laytable-cell-1-0-4 span, th>.laytable-cell-1-0-5 span{
  61. display: flex;
  62. font: 14px red;
  63. font-weight: 600;
  64. color: #5f5f5f;
  65. }
  66. #tabniubi tr:first-child th{
  67. border-right: 1px solid #e2e2e2 !important;
  68. }
  69. #filesBox2 th:sixth-child{
  70. border-right: none !important;
  71. }
  72. </style>
  73. </head>
  74. <body>
  75. <table id="tabniubi" cellpadding="1" cellspacing="1">
  76. <tr>
  77. <th style="width: 10%;height: 0;"></th>
  78. <th style="width: 10%;height: 0;"></th>
  79. <th style="width: 10%;height: 0;"></th>
  80. <th style="width: 10%;height: 0;"></th>
  81. <th style="width: 10%;height: 0;"></th>
  82. <th style="width: 10%;height: 0;"></th>
  83. <th style="width: 10%;height: 0;"></th>
  84. <th style="width: 10%;height: 0;"></th>
  85. <th style="width: 10%;height: 0;"></th>
  86. </tr>
  87. <tr border="1">
  88. {if $field.project_status == 1}
  89. <th class="form-title">项目状态</th>
  90. <th>
  91. {switch $detail.project_status}
  92. {case 1}立项中{/case}
  93. {case 2}审批中{/case}
  94. {case 3}待接收{/case}
  95. {case 4}待分配{/case}
  96. {case 5}作业中{/case}
  97. {case 6}归档中{/case}
  98. {case 7}退审中{/case}
  99. {case 8}已归档{/case}
  100. {case 9}已退审{/case}
  101. {case 0}
  102. {switch $detail.proprietor_status}
  103. {case 0}立项中{/case}
  104. {case 1}审核中{/case}
  105. {case 2}待接收{/case}
  106. {/switch}
  107. {/case}
  108. {default /}未知
  109. {/switch}
  110. </th>
  111. {/if}
  112. {if $field.project_name == 1}
  113. <th class="form-title">项目名称</th>
  114. <th colspan="3">{$detail.project_name}</th>
  115. {/if}
  116. {if $field.project_num == 1}
  117. <th class="form-title">项目编号</th>
  118. <th colspan="2">{$detail.project_num}</th>
  119. {/if}
  120. </tr>
  121. <tr>
  122. {if $field.project_time == 1}
  123. <th class="form-title">项目周期</th>
  124. <th colspan="8" style="text-align: left; padding-left: 3.5vw;">{$detail.project_start_time|date="Y-m-d"} 至 {$detail.project_end_time|date="Y-m-d"}</th>
  125. {/if}
  126. </tr>
  127. <tr>
  128. {if $field.engineering_type == 1}
  129. <th class="form-title">项目类型</th>
  130. <th>
  131. {if $detail.engineering_type1==1}
  132. 预算
  133. {elseif $detail.engineering_type1==2}
  134. 结算
  135. {elseif $detail.engineering_type1==3}
  136. 概算
  137. {elseif $detail.engineering_type1==4}
  138. 决算
  139. {elseif $detail.engineering_type1==5}
  140. 工程总承包(EPC)
  141. {/if}
  142. <!-- <div>
  143. <select name="type" lay-verify="required" lay-filter="aihao">
  144. <option value="1" style="align-items: center;">预算</option>
  145. <option value="2">结算</option>
  146. </select>
  147. </div>-->
  148. </th>
  149. <th class="form-title">——</th>
  150. <th>
  151. {if $detail.engineering_type2==1}
  152. 审核
  153. {elseif $detail.engineering_type2==2}
  154. 编制
  155. {/if}
  156. </th>
  157. {/if}
  158. {if $field.engineering_category == 1}
  159. <th class="form-title">工程类别</th>
  160. <th>{$detail.engineering_category}</th>
  161. {/if}
  162. {if $field.project_region == 1}
  163. <th class="form-title">项目区域</th>
  164. <th colspan="2">
  165. {$detail.province}-{$detail.city}-{$detail.area}
  166. <!--<div>
  167. <form class="layui-form">
  168. <div class="layui-form-item" style="margin-bottom: 0;">
  169. <div class="layui-input-inline" style="width: 6vw;">
  170. <select id="province" lay-filter="province" name="province">
  171. </select>
  172. </div>
  173. <div class="layui-input-inline area" style="width: 6vw;">
  174. <select id="city" lay-filter="city" name="city">
  175. </select>
  176. </div>
  177. <div class="layui-input-inline area" style="width: 6vw;">
  178. <select id="area" lay-filter="area" name="area">
  179. </select>
  180. </div>
  181. </div>
  182. </form>
  183. </div>-->
  184. </th>
  185. {/if}
  186. </tr>
  187. <tr>
  188. {if $field.fiscal_nature == 1}
  189. <th class="form-title">资金性质</th>
  190. <th>{$detail.fiscal_nature}</th>
  191. {/if}
  192. {if $field.project_scale == 1}
  193. <th class="form-title">项目规模</th>
  194. <th colspan="3">{$detail.project_scale}</th>
  195. {/if}
  196. {if $field.charge_standard == 1}
  197. <th class="form-title">收费标准</th>
  198. <th colspan="2">{$detail.charge_standard}</th>
  199. {/if}
  200. </tr>
  201. {if $field.entrust_unit == 1 || $field.entrust_head == 1 || $field.sent_review_unit == 1 || $field.sent_review_head == 1
  202. || $field.review_unit == 1 || $field.review_head == 1 || $field.operate_name == 1 || $field.operate_team_names == 1}
  203. <tr>
  204. <th colspan="9" class="forleft">相关单位</th>
  205. </tr>
  206. <tr>
  207. {if $field.entrust_unit == 1}
  208. <th class="form-title">委托单位</th>
  209. <th>{$detail.entrust_unit_name}</th>
  210. {/if}
  211. {if $field.entrust_head == 1}
  212. <th class="form-title">负责人</th>
  213. <th>{$detail.entrust_maker_name}</th>
  214. {/if}
  215. {if $field.sent_review_unit == 1}
  216. <th class="form-title">送审单位</th>
  217. <th>{$detail.sent_review_unit_name}</th>
  218. {/if}
  219. {if $field.sent_review_head == 1}
  220. <th class="form-title">负责人</th>
  221. <th colspan="2">{$detail.sent_review_head_name}</th>
  222. {/if}
  223. </tr>
  224. <tr>
  225. {if $field.review_unit == 1}
  226. <th class="form-title">评审机构</th>
  227. <th>{$detail.review_unit_name}</th>
  228. {/if}
  229. {if $field.review_head == 1}
  230. <th class="form-title">项目负责人</th>
  231. <th>{$detail.review_head_name}</th>
  232. {/if}
  233. {if $field.operate_name == 1}
  234. <th class="form-title">作业负责人</th>
  235. <th>{$detail.operate_head_name}</th>
  236. {/if}
  237. {if $field.operate_team_names == 1}
  238. <th class="form-title">作业成员</th>
  239. <th colspan="2">{$detail.operate_team_names}</th>
  240. {/if}
  241. </tr>
  242. {/if}
  243. {if $field.sent_review_amount == 1 || $field.authorize_amount == 1
  244. || $field.review_add_reduce_amount == 1 || $field.review_add_reduce_rate == 1 || $field.sent_review_cost == 1}
  245. <tr>
  246. <th colspan="9" class="forleft">金额详情</th>
  247. </tr>
  248. <tr>
  249. {if $field.sent_review_amount == 1}
  250. <th class="form-title" colspan="1">送审金额(元)</th>
  251. <th colspan="3" style="text-align: left;">{$detail.sent_review_amount}</th>
  252. {/if}
  253. {if $field.authorize_amount == 1}
  254. <th class="form-title" colspan="1">审定金额(元)</th>
  255. <th colspan="4" style="text-align: left;">{$detail.authorize_amount}</th>
  256. {/if}
  257. </tr>
  258. <tr>
  259. {if $field.review_add_reduce_amount == 1}
  260. <th class="form-title" colspan="1">审增额(元)</th>
  261. <th colspan="1">{$detail.review_add_amount}</th>
  262. <th class="form-title" colspan="1">审减额(元)</th>
  263. <th colspan="1">{$detail.review_reduce_amount}</th>
  264. {/if}
  265. {if $field.review_add_reduce_rate == 1}
  266. <th class="form-title" colspan="1">审增减率(%)</th>
  267. <th colspan="1">{$detail.review_add_reduce_rate}</th>
  268. {/if}
  269. {if $field.sent_review_cost == 1}
  270. <th class="form-title" colspan="1">送审服务费 (元)</th>
  271. <th colspan="4" style="text-align: left;">{$detail.sent_review_cost}</th>
  272. {/if}
  273. </tr>
  274. {/if}
  275. <!-- <tr>
  276. <th class="form-title" colspan="1">报告时间</th>
  277. <th colspan="8" style="text-align: left;">{$detail.report_time}</th>
  278. </tr>-->
  279. <tr>
  280. <th colspan="9" class="forleft">相关附件
  281. </th>
  282. </tr>
  283. <tr>
  284. <th colspan="9" class="fujianimg" style="padding: 0px;">
  285. <div id="filesBox2">
  286. <table class="layui-hide" id="get_file" lay-filter="get_file"></table>
  287. </div>
  288. </th>
  289. </tr>
  290. </table>
  291. <table class="layui-table layui-table-form">
  292. <table class="layui-table">
  293. <colgroup>
  294. <col width="110">
  295. <col width="800">
  296. <col width="250">
  297. <col width="250">
  298. <col width="250">
  299. </colgroup>
  300. <thead class="report-title">
  301. <tr>
  302. <th class="layui-th-gray-1 " colspan=9 style="height: 36px;">项目报告
  303. </th>
  304. </tr>
  305. {if !empty($report) }
  306. <thead>
  307. <tr class="heading" style="background-color:rgb(241, 241, 241);">
  308. <th>序号</th>
  309. <th style="text-align: left;">报告名称</th>
  310. <th>报告类型</th>
  311. <th>上传时间</th>
  312. <th>发布人</th>
  313. </tr>
  314. </thead>
  315. <tbody class="form">
  316. {volist name="report" id="vo"}
  317. <tr>
  318. <th>{$vo.id}</th>
  319. <th style="text-align: left;"><a data-id="{$vo.id}" lay-data="readreport" style="color: #187FDD;">{$vo.title}</a></th>
  320. <th> {switch $vo.type}
  321. {case 0}初审报告{/case}
  322. {case 1}对数报告{/case}
  323. {case 2}审定报告{/case}
  324. {default /}未知
  325. {/switch}
  326. </th>
  327. <th>{$vo.create_time|date="Y-m-d"}</th>
  328. <th>{$vo.nickname}</th>
  329. </tr>
  330. {/volist}
  331. </tbody>
  332. {/if}
  333. </table>
  334. {empty name="$report" }
  335. <div class="layui-data-none">暂无项目报告</div>
  336. {/empty}
  337. <table class="layui-table" >
  338. <colgroup>
  339. <col width="110">
  340. <col width="800">
  341. <col width="250">
  342. <col width="250">
  343. <col width="250">
  344. </colgroup>
  345. <thead class="heading-1">
  346. <tr>
  347. <th class="layui-td-gray-1" colspan=9 style="height: 36px;font-weight: 500;"> &nbsp;&nbsp;项目合同</th>
  348. </tr>
  349. {if !empty($contract) }
  350. <thead>
  351. <tr class="heading" >
  352. <th>序号</th>
  353. <th style="text-align: left;">合同名称</th>
  354. <th>合同性质</th>
  355. <th>签订时间</th>
  356. <th>签订人</th>
  357. </tr>
  358. </thead>
  359. <tbody class="form">
  360. {volist name="$contract" id="vo"}
  361. <tr>
  362. <td>{$vo.id}</td>
  363. <td style="text-align: left;"><a data-id="{$vo.id}" lay-data="readContract" href="" style="color: #187FDD;">{$vo.name}</a></td>
  364. <td> {switch $vo.type}
  365. {case 1}普通合同{/case}
  366. {case 2}框架合同{/case}
  367. {case 3}补充协议{/case}
  368. {case 3}其他合同{/case}
  369. {default /}未设置
  370. {/switch}
  371. </td>
  372. <td>{$vo.sign_time|date='Y-m-d'}</td>
  373. <td>{$vo.sign_name}</td>
  374. </tr>
  375. {/volist}
  376. </tbody>
  377. {/if}
  378. </table>
  379. {empty name="$contract" }
  380. <div class="layui-data-none">暂无项目合同</div>
  381. {/empty}
  382. </table>
  383. <script>
  384. function first(){
  385. let table = layui.table;
  386. //项目任务
  387. var allcount;
  388. parent.layui.get_fileTable = table.render({
  389. elem: '#get_file',
  390. title: '文档列表',
  391. toolbar: '#toolbarget_file',
  392. cellMinWidth: 80,
  393. parseData: function (res) { // 数据解析回调函数
  394. // 在这里可以获取数据总数
  395. allcount = res.data.length;
  396. return {
  397. code: res.code, // 数据状态码
  398. msg: res.msg, // 状态信息
  399. count: res.count, // 数据总数
  400. data: res.data // 当前页数据
  401. };
  402. },
  403. // className: 'layui-table-testcss', // 用于给表格主容器追加 css 类名
  404. // lineStyle: 'height: 151px;', // 定义表格的多行样式
  405. url: "/admin/project.api/get_file",
  406. where: {'id': project_id},
  407. page: true, //开启分页
  408. limit: 20,
  409. cols: [[
  410. {field: 'id', title: '序号', width: 80, align: 'center',
  411. templet: function (d) {
  412. console.log(allcount,d.LAY_NUM)
  413. return allcount - (d.LAY_NUM - 1);
  414. }
  415. },
  416. {field: 'name', title: '附件名称', align: 'left',
  417. },
  418. {field: 'remark', title: '附件说明', align: 'left',
  419. },
  420. {field: 'admin_name', title: '上传人', align: 'center', width: 150},
  421. {field: 'create_time', title: '上传时间', align: 'center', width: 100},
  422. {field: 'right', fixed: 'right', title: '操作', width: 150, align: 'center',
  423. templet: function (d) {
  424. var html = '<div class="layui-btn-group">';
  425. var btn1 = `<a href="https://view.officeapps.live.com/op/view.aspx?src=${d.filepath}" target="_blank" class="layui-btn layui-btn-xs">预览</a>`;
  426. var btn2 = `<a class="layui-btn layui-btn-xs layui-bg-blue" href="${d.filepath}" download="${d.name}" lay-event="">下载</a>`;
  427. return html + btn1 + btn2 +'</div>';
  428. }
  429. }
  430. ]]
  431. });
  432. layui.use(['form', 'jquery'], function () {
  433. var form = layui.form;
  434. const $ = layui.jquery;
  435. let adress;
  436. $.ajax({
  437. type:"get", //使用get方式
  438. url: "/static/assets/layui/adress.json", //json文件相对于这个HTML的路径
  439. dataType:"json",
  440. async: false,
  441. success:function(data) {
  442. //这个data就是json数据
  443. adress = data
  444. },
  445. error:function() {
  446. layer.alert("地址请求失败!! ");
  447. }
  448. });
  449. function getFirstAttr(obj) {
  450. for (var k in obj) return k;
  451. }
  452. function selectOption(selectedProvince, selectedCity,selectedArea) {
  453. var proStr = '', cityStr = '', areaStr = '';
  454. var pro = adress[selectedProvince], ci = adress[selectedProvince][selectedCity];
  455. for (var province in adress) {
  456. if (province == selectedProvince) proStr += '<option value="' + province + '" selected>' + province + '</option>';
  457. else proStr += '<option value="' + province + '">' + province + '</option>';
  458. }
  459. $("#province").html(proStr);
  460. for (var city in pro) {
  461. if (city == selectedCity) cityStr += '<option value="' + city + '" selected>' + city + '</option>';
  462. else cityStr += '<option value="' + city + '">' + city + '</option>';
  463. }
  464. $("#city").html(cityStr);
  465. for (var area in ci) {
  466. if(area == "remove"){
  467. continue;
  468. }
  469. if (ci[area] == selectedArea) areaStr += '<option value="' + ci[area] + '" selected>' + ci[area] + '</option>';
  470. else areaStr += '<option value="' + ci[area] + '">' + ci[area] + '</option>';
  471. }
  472. $("#area").html(areaStr);
  473. form.render();
  474. }
  475. selectOption('湖北省', getFirstAttr(adress['湖北省']),'硚口区');
  476. form.on('select(province)', function (data) {
  477. let thisProvince = data.value;
  478. let thisCity = getFirstAttr(adress[thisProvince]);
  479. selectOption(data.value, thisCity,thisCity[0]);
  480. });
  481. form.on('select(city)', function (data) {
  482. selectOption($("#province").val(), data.value,getFirstAttr(data.value));
  483. });
  484. })
  485. $('#filesBox').on('click','.file-del',function(){
  486. layer.msg("不可删除");
  487. })
  488. }
  489. </script>
  490. <script>
  491. // 获取具有指定 ID 的 <ul> 元素
  492. var ulElement = document.getElementById("filesBox");
  493. // 检查 <ul> 元素的子元素数量
  494. if (ulElement.children.length === 0) {
  495. // 如果子元素数量为 0,隐藏 <ul> 元素
  496. ulElement.style.display = "none";
  497. }
  498. </script>
  499. </body>
  500. </html>