edit_first.html 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. <style>
  2. .footer{
  3. width: 100%;
  4. height: 25px;
  5. text-align: center;
  6. margin-bottom: 0 !important;
  7. display: none;
  8. }
  9. .heading th {
  10. text-align: center;
  11. }
  12. .form td {
  13. text-align: center;
  14. }
  15. /* 日志 */
  16. .log_top {
  17. padding-left: 1vw;
  18. }
  19. .log_top span {
  20. margin: 0 0.5vw;
  21. }
  22. /* 1,1,1 */
  23. .log_commentary {
  24. color: rgb(0, 176, 80);
  25. }
  26. .log_company {
  27. color: rgb(255, 33, 0);
  28. }
  29. .log_content {
  30. width: fit-content;
  31. margin: 0.3vw 1.5vw 1vw 1.5vw;
  32. padding: 0.5vw 0vw;
  33. text-indent: 1.2em;
  34. line-height: 2.1vh;
  35. background-color: rgb(255, 255, 255);
  36. border-radius: 0.5vw;
  37. box-shadow: 0.19vw 0.16vw 0.4vw 0.03vw rgba(0, 0, 0, 0.13);
  38. }
  39. .log_content_color {
  40. /* background-color: rgb(250,250,250); */
  41. }
  42. .log_content_img img {
  43. /* width: 10%; */
  44. height: 150px;
  45. border-radius: 0.5vw;
  46. margin: 0.3vw 0;
  47. padding-right: 18px;
  48. padding-bottom: 7px;
  49. padding-left: 2px;
  50. }
  51. .log_item_top {
  52. height: 70%;
  53. overflow: scroll;
  54. }
  55. .log_item_top {
  56. height: 60vh;
  57. }
  58. .log_item_bottom {
  59. display: flex;
  60. /* height: 17vh; */
  61. /* border-top: 1px solid #eee; */
  62. margin: 0 1.5vw;
  63. /* background-color: rgb(250,250,250); */
  64. }
  65. .log_input input {
  66. width: 55vw;
  67. height: 10vh;
  68. border: #eee 1px solid;
  69. }
  70. .log_bottom_img {
  71. /* height: 5vh; */
  72. }
  73. .log_bottom_img img {
  74. height: 4vw;
  75. width: 6vw;
  76. border-radius: 0.5vw;
  77. margin: 0.5vw 0vw 0.5vw 0.3vw;
  78. }
  79. .log_bottom_left {
  80. width: 100%;
  81. margin-top: 1.5vh;
  82. }
  83. .log_bottom_right {
  84. width: 5%;
  85. }
  86. /* 上传图片 */
  87. .layui-upload-drag-self {
  88. background-color: #fbfdff;
  89. border: 1px dashed #c0ccda;
  90. border-radius: 6px;
  91. box-sizing: border-box;
  92. line-height: 4vw;
  93. vertical-align: top;
  94. display: inline-block;
  95. text-align: center;
  96. cursor: pointer;
  97. outline: 0;
  98. margin-right: 13px;
  99. float: left;
  100. }
  101. .layui-input-inlines-self {
  102. position: relative;
  103. margin-left: 90px;
  104. min-height: 36px;
  105. text-align: left;
  106. }
  107. .layui-upload-drag-self .layui-icon {
  108. font-size: 28px;
  109. color: #8c939d
  110. }
  111. .layui-upload-drag-self .img {
  112. position: relative;
  113. height: 148px;
  114. width: 148px;
  115. }
  116. .layui-upload-img {
  117. width: 148px;
  118. height: 148px;
  119. border-radius: 6px;
  120. margin-top: -3px;
  121. margin-left: -2px;
  122. }
  123. .handle {
  124. position: absolute;
  125. width: 148px;
  126. height: 100%;
  127. z-index: 100;
  128. border-radius: 6px;
  129. top: 0;
  130. background: rgba(59, 60, 61, 0.6);
  131. text-align: center;
  132. }
  133. .handle .icon-myself {
  134. z-index: 999;
  135. transition: all .3s;
  136. cursor: pointer;
  137. font-size: 25px;
  138. width: 25px;
  139. color: rgba(255, 255, 255, 0.91);
  140. margin: 0 4px;
  141. }
  142. .log_textarea {
  143. width: 89vw;
  144. height: 8vh;
  145. padding: 0.5vw;
  146. /* margin-right: 2vw; */
  147. margin: 1vw;
  148. }
  149. .log_button_img {
  150. width: 2vw;
  151. }
  152. .log_card {
  153. border: none !important;
  154. }
  155. /* 点击图片放大 */
  156. .content_img img {
  157. max-width: 100%;
  158. cursor: pointer;
  159. }
  160. .overlay {
  161. display: none;
  162. position: fixed;
  163. top: 0;
  164. left: 0;
  165. width: 100%;
  166. height: 100%;
  167. background-color: rgba(0, 0, 0, 0.7);
  168. justify-content: center;
  169. z-index: 1;
  170. }
  171. .overlay img {
  172. margin-top: 4%;
  173. max-width: 90%;
  174. max-height: 90%;
  175. object-fit: contain;
  176. }
  177. .p-4 {
  178. background-color: rgb(255, 255, 255);
  179. }
  180. /*表格*/
  181. #tabniubi {
  182. width: 100%;
  183. margin: 10px 0;
  184. background-color: #fff;
  185. color: #5f5f5f;
  186. }
  187. #tabniubi th {
  188. padding: 9px 15px;
  189. min-height: 20px;
  190. height: 40px;
  191. line-height: 40px;
  192. text-align: center;
  193. /* font-size: 14px; */
  194. border-width: 1px;
  195. border-style: solid;
  196. border-color: #e2e2e2;
  197. font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
  198. }
  199. #tabniubi tr:first-child {
  200. padding: 0;
  201. min-height: 0;
  202. line-height: 0;
  203. border-width: 0;
  204. border-style: none;
  205. border-color: #fff;
  206. font-size: 0;
  207. }
  208. #tabniubi tr:first-child th {
  209. padding: 0;
  210. min-height: 0;
  211. line-height: 0;
  212. border-width: 0;
  213. border-style: none;
  214. border-color: #fff;
  215. font-size: 0;
  216. }
  217. .form-title {
  218. background-color: rgb(241, 241, 241);
  219. color: rgb(95, 95, 95);
  220. border-color: rgb(241, 241, 241);
  221. font-weight: 600;
  222. }
  223. .forleft {
  224. text-align: left !important;
  225. }
  226. /* .forright{
  227. text-align:right !important;
  228. } */
  229. .layui-form-select dl dd.layui-this {
  230. background-color: #f8f8f8;
  231. color: rgb(23, 145, 233);
  232. font-weight: 700;
  233. }
  234. .layui-input, .layui-textarea {
  235. /* padding-left: 3.75vw; */
  236. color: #5f5f5f;
  237. }
  238. .upimg {
  239. width: 250px;
  240. height: 250px;
  241. }
  242. .fujianimg img {
  243. height: 5.5vh;
  244. }
  245. .filelist{
  246. width: 100%;
  247. overflow: auto;
  248. justify-content:flex-start;
  249. align-content: space-between;
  250. flex-direction: column-reverse;
  251. flex-wrap: wrap;
  252. display: flex;
  253. }
  254. .filelist li{
  255. padding: 0.5vw 0.8vw 0.5vw 0.8vw;
  256. white-space: nowrap;
  257. overflow: hidden;
  258. text-overflow: ellipsis;
  259. display: inline-block;
  260. border-right: 1px solid #e2e2e2;
  261. float: left;
  262. }
  263. .filelist p{
  264. margin: 3px 0 5px 0;
  265. width: 11vw;
  266. overflow: hidden;
  267. text-overflow: ellipsis;
  268. text-align: center;
  269. }
  270. #filesBox2 li{
  271. padding: 0.5vw 0.8vw 0.5vw 0.8vw;
  272. white-space: nowrap;
  273. overflow: hidden;
  274. text-overflow: ellipsis;
  275. display: inline-block;
  276. border-right: 1px solid #e2e2e2;
  277. float: left;
  278. }
  279. #filesBox2 .layui-table-tool{
  280. display: none;
  281. }
  282. #filesBox2 .layui-table-view .layui-table{
  283. width: 100% !important;
  284. }
  285. #filesBox2 .layui-table-cell{
  286. display: flex;
  287. align-items: center;
  288. justify-content: center;
  289. }
  290. .laytable-cell-1-0-1, .laytable-cell-1-0-2{
  291. justify-content: flex-start !important;
  292. }
  293. .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{
  294. display: flex;
  295. font: 14px red;
  296. font-weight: 600;
  297. color: #5f5f5f;
  298. }
  299. #tabniubi tr:first-child th{
  300. border-right: 1px solid #e2e2e2 !important;
  301. }
  302. #filesBox2 th:sixth-child{
  303. border-right: none !important;
  304. }
  305. </style>
  306. <form class="layui-form p-4" method="POST">
  307. <table id="tabniubi" cellpadding="1" cellspacing="1">
  308. <tr>
  309. <th style="width: 10%;height: 0;"></th>
  310. <th style="width: 10%;height: 0;"></th>
  311. <th style="width: 10%;height: 0;"></th>
  312. <th style="width: 10%;height: 0;"></th>
  313. <th style="width: 10%;height: 0;"></th>
  314. <th style="width: 10%;height: 0;"></th>
  315. <th style="width: 10%;height: 0;"></th>
  316. <th style="width: 10%;height: 0;"></th>
  317. <th style="width: 10%;height: 0;"></th>
  318. </tr>
  319. <tr border="1">
  320. {if $field.project_status == 1}
  321. <th class="form-title">项目状态</th>
  322. <th>
  323. {switch $detail.project_status}
  324. {case 1}立项中{/case}
  325. {case 2}审批中{/case}
  326. {case 3}待接收{/case}
  327. {case 4}待分配{/case}
  328. {case 5}作业中{/case}
  329. {case 6}归档中{/case}
  330. {case 7}退审中{/case}
  331. {case 8}已归档{/case}
  332. {case 9}已退审{/case}
  333. {case 0}
  334. {switch $detail.proprietor_status}
  335. {case 0}立项中{/case}
  336. {case 1}审核中{/case}
  337. {case 2}待接收{/case}
  338. {/switch}
  339. {/case}
  340. {default /}未知
  341. {/switch}
  342. </th>
  343. {/if}
  344. {if $field.project_name == 1}
  345. <th class="form-title">项目名称</th>
  346. <th colspan="3">{$detail.project_name}</th>
  347. {/if}
  348. {if $field.project_num == 1}
  349. <th class="form-title">项目编号</th>
  350. <th colspan="2">{$detail.project_num}</th>
  351. {/if}
  352. </tr>
  353. <tr>
  354. {if $field.project_time == 1}
  355. <th class="form-title">项目周期</th>
  356. <th colspan="8" style="text-align: left; padding-left: 3.5vw;">{$detail.project_start_time|date="Y-m-d"} 至
  357. {$detail.project_end_time|date="Y-m-d"}
  358. </th>
  359. {/if}
  360. </tr>
  361. <tr>
  362. {if $field.engineering_type == 1}
  363. <th class="form-title">项目类型</th>
  364. <th>
  365. <div>
  366. <select name="engineering_type1" lay-verify="required" lay-filter="aihao"
  367. {if $field_edit.engineering_type_edit != 1}
  368. disabled
  369. {/if}
  370. >
  371. <option value="1" {eq name="$detail.engineering_type1" value="1"} selected {/eq}>预算</option>
  372. <option value="2" {eq name="$detail.engineering_type1" value="2"} selected {/eq}>结算</option>
  373. <option value="3" {eq name="$detail.engineering_type1" value="3"} selected {/eq}>概算</option>
  374. <option value="4" {eq name="$detail.engineering_type1" value="4"} selected {/eq}>决算</option>
  375. <option value="5" {eq name="$detail.engineering_type1" value="5"} selected {/eq}>工程总承包(EPC)</option>
  376. </select>
  377. </div>
  378. </th>
  379. <th class="form-title">——</th>
  380. <th>
  381. <div>
  382. <select name="engineering_type2" lay-verify="required" lay-filter="aihao"
  383. {if $field_edit.engineering_type_edit != 1}
  384. disabled
  385. {/if}
  386. >
  387. <option value="1" {eq name="$detail.engineering_type2" value="1"} selected {/eq}>审核</option>
  388. <option value="2" {eq name="$detail.engineering_type2" value="2"} selected {/eq}>编制</option>
  389. </select>
  390. </div>
  391. </th>
  392. {/if}
  393. {if $field.engineering_category == 1}
  394. <th class="form-title">工程类别</th>
  395. <th>
  396. <div>
  397. <select name="engineering_category" lay-filter="engineering_category"
  398. {if $field_edit.engineering_category_edit != 1}
  399. disabled
  400. {/if}>
  401. <option value="">请选择工程类别</option>
  402. <option value="建筑物" {eq name="$detail.engineering_category" value="建筑物"} selected {/eq}>建筑物</option>
  403. <option value="交通" {eq name="$detail.engineering_category" value="交通"} selected {/eq}>交通</option>
  404. <option value="水利" {eq name="$detail.engineering_category" value="水利"} selected {/eq}>水利</option>
  405. <option value="土地整治" {eq name="$detail.engineering_category" value="土地整治"} selected {/eq}>土地整治</option>
  406. <option value="市政园林" {eq name="$detail.engineering_category" value="市政园林"} selected {/eq}>市政园林</option>
  407. <option value="信息网络" {eq name="$detail.engineering_category" value="信息网络"} selected {/eq}>信息网络</option>
  408. <option value="其他" {eq name="$detail.engineering_category" value="其他"} selected {/eq}>其他</option>
  409. </select>
  410. </div>
  411. </th>
  412. {/if}
  413. {if $field.project_region == 1}
  414. <th class="form-title">项目区域</th>
  415. <th colspan="2">
  416. <div>
  417. <div class="layui-form-item"
  418. style="margin-bottom: 0;display: flex;flex-direction: row;justify-content: space-between;">
  419. <div class="layui-input-inline" style="width: 6.5vw;">
  420. <select id="province" lay-filter="province" name="province"
  421. {if $field_edit.project_region_edit != 1}
  422. disabled
  423. {/if}
  424. ></select>
  425. </div>
  426. <div class="layui-input-inline area" style="width: 6.5vw;">
  427. <select id="city" lay-filter="city" name="city"
  428. {if $field_edit.project_region_edit != 1}
  429. disabled
  430. {/if}
  431. ></select>
  432. </div>
  433. <div class="layui-input-inline area" style="width: 6.5vw;">
  434. <select id="area" lay-filter="area" name="area"
  435. {if $field_edit.project_region_edit != 1}
  436. disabled
  437. {/if}
  438. ></select>
  439. </div>
  440. </div>
  441. </div>
  442. </th>
  443. {/if}
  444. </tr>
  445. <tr>
  446. {if $field.fiscal_nature == 1}
  447. <th class="form-title">资金性质</th>
  448. <th>
  449. <div>
  450. <select name="fiscal_nature" lay-filter="aihao"
  451. {if $field_edit.fiscal_nature_edit != 1}
  452. disabled
  453. {/if}
  454. >
  455. <option value="">请选择资金性质</option>
  456. <option value="财政资金" {eq name="$detail.fiscal_nature" value="财政资金"} selected {/eq}>财政资金</option>
  457. <option value="非财政资金" {eq name="$detail.fiscal_nature" value="非财政资金"} selected {/eq}>非财政资金</option>
  458. </select>
  459. </div>
  460. </th>
  461. {/if}
  462. {if $field.project_scale == 1}
  463. <th class="form-title">项目规模</th>
  464. <th colspan="3">
  465. <input type="text" name="project_scale" value="{$detail.project_scale}" autocomplete="off"
  466. placeholder="请输入项目规模"
  467. {if $field_edit.project_scale_edit != 1}
  468. readonly
  469. {/if}
  470. class="layui-input">
  471. </th>
  472. {/if}
  473. {if $field.charge_standard == 1}
  474. <th class="form-title">收费标准</th>
  475. <th colspan="2">
  476. <input type="text" name="charge_standard" value="{$detail.charge_standard}" autocomplete="off"
  477. placeholder="请输入收费标准"
  478. {if $field_edit.charge_standard_edit != 1}
  479. readonly
  480. {/if}
  481. class="layui-input">
  482. </th>
  483. {/if}
  484. </tr>
  485. {if $field.entrust_unit == 1 || $field.entrust_head == 1 || $field.sent_review_unit == 1 || $field.sent_review_head == 1
  486. || $field.review_unit == 1 || $field.review_head == 1 || $field.operate_name == 1 || $field.operate_team_names == 1}
  487. <tr>
  488. <th colspan="9" class="forleft">相关单位</th>
  489. </tr>
  490. <tr>
  491. {if $field.entrust_unit == 1}
  492. <th class="form-title">委托单位</th>
  493. <th>
  494. {$detail.entrust_unit_name}
  495. </th>
  496. {/if}
  497. {if $field.entrust_head == 1}
  498. <th class="form-title">负责人</th>
  499. <th>
  500. {$detail.entrust_maker_name}
  501. </th>
  502. {/if}
  503. {if $field.sent_review_unit == 1}
  504. <th class="form-title">送审单位</th>
  505. <th>
  506. {$detail.sent_review_unit_name}
  507. </th>
  508. {/if}
  509. {if $field.sent_review_head == 1}
  510. <th class="form-title">负责人</th>
  511. <th colspan="2">
  512. {$detail.sent_review_head_name}
  513. </th>
  514. {/if}
  515. </tr>
  516. <tr>
  517. {if $field.review_unit == 1}
  518. <th class="form-title">评审机构</th>
  519. <th>
  520. {$detail.review_unit_name}
  521. </th>
  522. {/if}
  523. {if $field.review_head == 1}
  524. <th class="form-title">项目负责人</th>
  525. <th>
  526. {$detail.review_head_name}
  527. </th>
  528. {/if}
  529. {if $field.operate_name == 1}
  530. <th class="form-title">作业负责人</th>
  531. <th>
  532. {$detail.operate_head_name}
  533. </th>
  534. {/if}
  535. {if $field.operate_team_names == 1}
  536. <th class="form-title">作业成员</th>
  537. <th colspan="2">
  538. {$detail.operate_team_names}
  539. </th>
  540. {/if}
  541. </tr>
  542. {/if}
  543. <tr>
  544. <th colspan="9" class="forleft">金额详情</th>
  545. </tr>
  546. <tr>
  547. {if $field.sent_review_amount == 1}
  548. <th class="form-title" colspan="1">送审金额(元)</th>
  549. <th colspan="2">
  550. <input type="text" id="sent_review_amount" name="sent_review_amount" onkeyup="Add()"
  551. value="{$detail.sent_review_amount}" autocomplete="off" placeholder="请输入送审金额"
  552. {if $field_edit.sent_review_amount_edit != 1}
  553. readonly
  554. {/if}
  555. class="layui-input">
  556. </th>
  557. {/if}
  558. {if $field.review_add_reduce_amount == 1}
  559. <th class="form-title" colspan="1">审增金额(元)</th>
  560. <th colspan="2">
  561. <input type="text" id="review_add_amount" name="review_add_amount" value="{$detail.review_add_amount}" onkeyup="Add()"
  562. autocomplete="off" placeholder="请输入审增额"
  563. {if $field_edit.authorize_amount_edit != 1}
  564. readonly
  565. {/if}
  566. class="layui-input">
  567. </th>
  568. {/if}
  569. {if $field.review_add_reduce_amount == 1}
  570. <th class="form-title" colspan="1">审减金额(元)</th>
  571. <th colspan="2">
  572. <input type="text" id="review_reduce_amount" name="review_reduce_amount" value="{$detail.review_reduce_amount}" onkeyup="Add()"
  573. autocomplete="off" placeholder="请输入审减额"
  574. {if $field_edit.authorize_amount_edit != 1}
  575. readonly
  576. {/if}
  577. class="layui-input">
  578. </th>
  579. {/if}
  580. </tr>
  581. <tr>
  582. {if $field.authorize_amount == 1}
  583. <th class="form-title" colspan="1">审定金额(元)</th>
  584. <th colspan="2" style="text-align: left;">
  585. <input type="text" id="authorize_amount" name="authorize_amount" value="{$detail.authorize_amount}" onkeyup="Add()"
  586. autocomplete="off" placeholder="请输入审定金额"
  587. {if $field_edit.authorize_amount_edit != 1}
  588. readonly
  589. {/if}
  590. class="layui-input">
  591. </th>
  592. {/if}
  593. {if $field.review_add_reduce_rate == 1}
  594. <th class="form-title" colspan="1">审增减率(%)</th>
  595. <th colspan="2">
  596. <span id="review_add_reduce_rate">{$detail.review_add_reduce_rate}</span>
  597. <input type="hidden" name="review_add_reduce_rate" value="{$detail.review_add_reduce_rate}" autocomplete="off" placeholder="请输入审增减率" class="layui-input">
  598. </th>
  599. {/if}
  600. {if $field.sent_review_cost == 1}
  601. <th class="form-title" colspan="1">送审服务费 (元)</th>
  602. <th colspan="2" style="text-align: left;">
  603. <input type="text" name="sent_review_cost" value="{$detail.sent_review_cost}" autocomplete="off" placeholder="请输入送审服务费"
  604. {if $field_edit.sent_review_cost_edit != 1}
  605. readonly
  606. {/if}
  607. class="layui-input">
  608. </th>
  609. {/if}
  610. </tr>
  611. <!-- <tr>
  612. <th class="form-title" colspan="1">报告时间</th>
  613. <th colspan="8" style="text-align: left;">{$detail.report_time}</th>
  614. </tr>-->
  615. <tr>
  616. <th colspan="9" class="forleft">相关附件
  617. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-on="test-iframe-handle" style="float: right;">
  618. 上传附件
  619. <span id="ID-test-iframe-mark"></span>
  620. </button>
  621. </th>
  622. </tr>
  623. <tr>
  624. <th colspan="9" class="fujianimg" style="padding: 0px 0px;">
  625. <div id="filesBox2">
  626. <table class="layui-hide" id="get_file" lay-filter="get_file"></table>
  627. </div>
  628. </th>
  629. </tr>
  630. </table>
  631. <div class="py-3">
  632. <input type="hidden" name="id" value="{$detail.id}"/>
  633. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="save">保存</button>
  634. </div>
  635. </form>
  636. <script>
  637. //审定金额=送审金额+审增金额+审减金额
  638. //(审定金额-送审金额)/送审金额*100%
  639. function Add(){
  640. var input1 = 0,input2 = 0,input3 = 0,input4 = 0;
  641. input1 = Number(document.getElementById("sent_review_amount").value).toFixed(2);
  642. input2 = Number(document.getElementById("authorize_amount").value).toFixed(2);
  643. // input3 = Number(document.getElementById("review_add_amount").value).toFixed(2);
  644. // input4 = Number(document.getElementById("review_reduce_amount").value).toFixed(2);
  645. if (input1!=="0.00" && input2!=="0.00") {
  646. var aa= (input2-input1).toFixed(2);
  647. var bb = aa/input1*100;
  648. bb = bb.toFixed(2);
  649. $('[name="review_add_reduce_rate"]').val(bb);
  650. $('#review_add_reduce_rate').html(bb)
  651. }else {
  652. $('[name="review_add_reduce_rate"]').val('0.00');
  653. $('#review_add_reduce_rate').html('0.00')
  654. }
  655. // 总审定金额-总送审金额
  656. }
  657. function first() {
  658. var form = layui.form, tool = layui.tool, oaTool = layui.oaTool;
  659. let table = layui.table;
  660. //附件表格
  661. var allcount;
  662. parent.layui.get_fileTable = table.render({
  663. elem: '#get_file',
  664. title: '文档列表',
  665. toolbar: '#toolbarget_file',
  666. cellMinWidth: 80,
  667. parseData: function (res) { // 数据解析回调函数
  668. // 在这里可以获取数据总数
  669. allcount = res.data.length;
  670. return {
  671. code: res.code, // 数据状态码
  672. msg: res.msg, // 状态信息
  673. count: res.count, // 数据总数
  674. data: res.data // 当前页数据
  675. };
  676. },
  677. // className: 'layui-table-testcss', // 用于给表格主容器追加 css 类名
  678. // lineStyle: 'height: 151px;', // 定义表格的多行样式
  679. url: "/admin/project.api/get_file",
  680. where: {'id': project_id},
  681. page: true, //开启分页
  682. limit: 20,
  683. cols: [[
  684. {field: 'id', title: '序号', width: 80, align: 'center',
  685. templet: function (d) {
  686. console.log(allcount,d.LAY_NUM)
  687. return allcount - (d.LAY_NUM - 1);
  688. }
  689. },
  690. {field: 'name', title: '附件名称', align: 'left',
  691. },
  692. {field: 'remark', title: '附件说明', align: 'left',
  693. },
  694. {field: 'admin_name', title: '上传人', align: 'center', width: 150},
  695. {field: 'create_time', title: '上传时间', align: 'center', width: 150,
  696. templet:"<div>{{layui.util.toDateString(d.create_time*1000, 'yyyy-MM-dd HH:mm:ss')}}</div>"},
  697. {field: 'right', fixed: 'right', title: '操作', width: 150, align: 'center',
  698. templet: function (d) {
  699. var html = '<div class="layui-btn-group">';
  700. var btn1 = `<a href="https://view.officeapps.live.com/op/view.aspx?src=${d.filepath}" target="_blank" class="layui-btn layui-btn-xs">预览</a>`;
  701. var btn2 = `<a class="layui-btn layui-btn-xs layui-bg-blue" href="${d.filepath}" download="${d.name}" lay-event="">下载</a>`;
  702. var btn3 = `<span data-id="${d.id}" class="layui-btn layui-btn-xs layui-btn-danger file-del ">删除</span>`;
  703. return html + btn1 + btn2 + btn3 +'</div>';
  704. }
  705. }
  706. ]]
  707. });
  708. //上传附件弹出窗
  709. layui.use(function(){
  710. var $ = layui.$;
  711. var layer = layui.layer;
  712. var upload = layui.upload;
  713. var util = layui.util;
  714. // 事件
  715. util.on('lay-on', {
  716. 'test-iframe-handle': function(){
  717. layer.open({
  718. type: 2,
  719. area: ['680px', '520px'],
  720. content: 'ceshi?id={$detail.id}',
  721. fixed: false, // 不固定
  722. maxmin: true,
  723. shadeClose: true,
  724. title: '上传附件',
  725. btnAlign: 'c',
  726. yes: function(index, layero){
  727. // 获取 iframe 的窗口对象
  728. var iframeWin = window[layero.find('iframe')[0]['name']];
  729. var elemMark = iframeWin.$('#mark'); // 获得 iframe 中某个输入框元素
  730. var value = elemMark.val();
  731. if($.trim(value) === '') return elemMark.focus();
  732. // 显示获得的值
  733. layer.msg('获得 iframe 中的输入框标记值:'+ value);
  734. }
  735. });
  736. },
  737. })
  738. });
  739. let adress;
  740. //日期选择
  741. layui.laydate.render({
  742. elem: '#date',
  743. range: ['#start_time', '#end_time'],
  744. rangeLinked: true
  745. });
  746. let c = 1;
  747. //监听提交
  748. form.on('submit(save)', function (data) {
  749. if(c){
  750. let callback = function (e) {
  751. c = 1
  752. layer.msg(e.msg);
  753. if (e.code == 0) {
  754. tool.sideClose(1000);
  755. }
  756. }
  757. var engineering_type1 ='';
  758. if(data.field.engineering_type1==1){
  759. engineering_type1 ='预算';
  760. }else if(data.field.engineering_type1==2){
  761. engineering_type1 ='结算';
  762. }else if(data.field.engineering_type1==3){
  763. engineering_type1 ='概算';
  764. }else if(data.field.engineering_type1==4){
  765. engineering_type1 ='决算';
  766. }else if(data.field.engineering_type1==5){
  767. engineering_type1 ='工程总承包(EPC)';
  768. }
  769. var engineering_type2 = '';
  770. if(data.field.engineering_type2==1){
  771. engineering_type2 ='审核';
  772. }else if(data.field.engineering_type2==2) {
  773. engineering_type2 = '编制';
  774. }
  775. if(engineering_type1!==""&&engineering_type2!==""){
  776. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  777. }
  778. tool.post("/admin/project.cost_company/edit", data.field, callback);
  779. }
  780. c = 0
  781. return false;
  782. });
  783. oaTool.addFile({
  784. type: 1,
  785. isSave: true,
  786. ajaxSave: function (res) {
  787. let callback = function (e) {
  788. if(e.code == 202){
  789. layer.msg(e.msg);
  790. }else{
  791. layer.msg('上传成功!');
  792. }
  793. setTimeout(function () {
  794. $("#filesBox2").load(location.href+" #filesBox>*","type=2")
  795. }, 500)
  796. }
  797. // console.log(res,"{$detail.id}")
  798. tool.post("/admin/project.api/add_file_company", {
  799. 'topic_id': "{$detail.id}",
  800. 'file_id': res.data.id,
  801. 'file_name': res.data.name,
  802. 'module': 'project'
  803. }, callback);
  804. }
  805. });
  806. $('#filesBox2').on('click', '.file-del', function () {
  807. let id = $(this).parent().parent().data('id');
  808. layer.confirm('确定要删除该文件吗?请慎重', {icon: 3, title: '提示'}, function (index) {
  809. let callback = function (e) {
  810. $("#" + id + "").remove();
  811. layer.closeAll();
  812. layer.msg(e.msg);
  813. $('[lay-filter="webform"]').click();
  814. }
  815. tool.delete("/admin/project.api/delete_file_company", {id: id}, callback);
  816. });
  817. })
  818. layui.use(['form', 'jquery'], function () {
  819. var form = layui.form;
  820. const $ = layui.jquery;
  821. let adress;
  822. $.ajax({
  823. type: "get", //使用get方式
  824. url: "/static/assets/layui/adress.json", //json文件相对于这个HTML的路径
  825. dataType: "json",
  826. async: false,
  827. success: function (data) {
  828. //这个data就是json数据
  829. adress = data
  830. var province = Object.keys(adress)
  831. var proStrs = '<option value="">省</option>';
  832. for (var i = 0; i < province.length; i++) {
  833. proStrs += '<option value="' + province[i] + '">' + province[i] + '</option>';
  834. }
  835. $("#province").html(proStrs);
  836. layui.form.render("select")
  837. },
  838. error: function () {
  839. layer.alert("地址请求失败!! ");
  840. }
  841. });
  842. function getFirstAttr(obj) {
  843. for (var k in obj) return k;
  844. }
  845. function selectOption(selectedProvince, selectedCity = '', selectedArea = '') {
  846. var proStr = '<option value="">省</option>', cityStr = '<option value="">市</option>',
  847. areaStr = '<option value="">县</option>';
  848. var pro = adress[selectedProvince], ci = adress[selectedProvince][selectedCity];
  849. for (var province in adress) {
  850. if (province == selectedProvince) proStr += '<option value="' + province + '" selected>' + province + '</option>';
  851. else proStr += '<option value="' + province + '">' + province + '</option>';
  852. }
  853. $("#province").html(proStr);
  854. for (var city in pro) {
  855. if (city == selectedCity) cityStr += '<option value="' + city + '" selected>' + city + '</option>';
  856. else cityStr += '<option value="' + city + '">' + city + '</option>';
  857. }
  858. $("#city").html(cityStr);
  859. for (var area in ci) {
  860. if (area == "remove") {
  861. continue;
  862. }
  863. if (ci[area] == selectedArea) areaStr += '<option value="' + ci[area] + '" selected>' + ci[area] + '</option>';
  864. else areaStr += '<option value="' + ci[area] + '">' + ci[area] + '</option>';
  865. }
  866. $("#area").html(areaStr);
  867. form.render();
  868. }
  869. /*selectOption(1,2, 3);*/
  870. form.on('select(province)', function (data) {
  871. let thisProvince = data.value;
  872. let thisCity = getFirstAttr(adress[thisProvince]);
  873. selectOption(data.value);
  874. });
  875. form.on('select(city)', function (data) {
  876. selectOption($("#province").val(), data.value, getFirstAttr(data.value));
  877. });
  878. selectOption("{$detail.province}","{$detail.city}","{$detail.area}")
  879. })
  880. }
  881. </script>
  882. <script>
  883. // 获取具有指定 ID 的 <ul> 元素
  884. var ulElement = document.getElementById("filesBox");
  885. // 检查 <ul> 元素的子元素数量
  886. if (ulElement.children.length === 0) {
  887. // 如果子元素数量为 0,隐藏 <ul> 元素
  888. ulElement.style.display = "none";
  889. }
  890. </script>