edit_first.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056
  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. {if $detail.project_start_time != null}
  357. <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>
  358. {else/}
  359. <th colspan="8" style="text-align: left; padding-left: 3.5vw;"> </th>
  360. {/if}
  361. {/if}
  362. </tr>
  363. <tr>
  364. {if $field.engineering_type == 1}
  365. <th class="form-title">项目类型</th>
  366. <th>
  367. <div>
  368. <select name="engineering_type1" lay-verify="required" lay-filter="aihao"
  369. {if $field_edit.engineering_type_edit != 1}
  370. disabled
  371. {/if}
  372. >
  373. <option value="1" {eq name="$detail.engineering_type1" value="1"} selected {/eq}>预算</option>
  374. <option value="2" {eq name="$detail.engineering_type1" value="2"} selected {/eq}>结算</option>
  375. <option value="3" {eq name="$detail.engineering_type1" value="3"} selected {/eq}>概算</option>
  376. <option value="4" {eq name="$detail.engineering_type1" value="4"} selected {/eq}>决算</option>
  377. <option value="5" {eq name="$detail.engineering_type1" value="5"} selected {/eq}>工程总承包(EPC)</option>
  378. </select>
  379. </div>
  380. </th>
  381. <th class="form-title">——</th>
  382. <th>
  383. <div>
  384. <select name="engineering_type2" lay-verify="required" lay-filter="aihao"
  385. {if $field_edit.engineering_type_edit != 1}
  386. disabled
  387. {/if}
  388. >
  389. <option value="1" {eq name="$detail.engineering_type2" value="1"} selected {/eq}>审核</option>
  390. <option value="2" {eq name="$detail.engineering_type2" value="2"} selected {/eq}>编制</option>
  391. </select>
  392. </div>
  393. </th>
  394. {/if}
  395. {if $field.engineering_category == 1}
  396. <th class="form-title">工程类别</th>
  397. <th>
  398. <div>
  399. <select name="engineering_category" lay-filter="engineering_category"
  400. {if $field_edit.engineering_category_edit != 1}
  401. disabled
  402. {/if}>
  403. <option value="">请选择工程类别</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. <option value="信息网络" {eq name="$detail.engineering_category" value="信息网络"} selected {/eq}>信息网络</option>
  410. <option value="其他" {eq name="$detail.engineering_category" value="其他"} selected {/eq}>其他</option>
  411. </select>
  412. </div>
  413. </th>
  414. {/if}
  415. {if $field.project_region == 1}
  416. <th class="form-title">项目区域</th>
  417. <th colspan="2">
  418. <div>
  419. <div class="layui-form-item"
  420. style="margin-bottom: 0;display: flex;flex-direction: row;justify-content: space-between;">
  421. <div class="layui-input-inline" style="width: 6.5vw;">
  422. <select id="province" lay-filter="province" name="province"
  423. {if $field_edit.project_region_edit != 1}
  424. disabled
  425. {/if}
  426. ></select>
  427. </div>
  428. <div class="layui-input-inline area" style="width: 6.5vw;">
  429. <select id="city" lay-filter="city" name="city"
  430. {if $field_edit.project_region_edit != 1}
  431. disabled
  432. {/if}
  433. ></select>
  434. </div>
  435. <div class="layui-input-inline area" style="width: 6.5vw;">
  436. <select id="area" lay-filter="area" name="area"
  437. {if $field_edit.project_region_edit != 1}
  438. disabled
  439. {/if}
  440. ></select>
  441. </div>
  442. </div>
  443. </div>
  444. </th>
  445. {/if}
  446. </tr>
  447. <tr>
  448. {if $field.fiscal_nature == 1}
  449. <th class="form-title">资金性质</th>
  450. <th>
  451. <div>
  452. <select name="fiscal_nature" lay-filter="aihao"
  453. {if $field_edit.fiscal_nature_edit != 1}
  454. disabled
  455. {/if}
  456. >
  457. <option value="">请选择资金性质</option>
  458. <option value="财政资金" {eq name="$detail.fiscal_nature" value="财政资金"} selected {/eq}>财政资金</option>
  459. <option value="非财政资金" {eq name="$detail.fiscal_nature" value="非财政资金"} selected {/eq}>非财政资金</option>
  460. </select>
  461. </div>
  462. </th>
  463. {/if}
  464. {if $field.project_scale == 1}
  465. <th class="form-title">项目规模</th>
  466. <th colspan="3">
  467. <input type="text" name="project_scale" value="{$detail.project_scale}" autocomplete="off"
  468. placeholder="请输入项目规模"
  469. {if $field_edit.project_scale_edit != 1}
  470. readonly
  471. {/if}
  472. class="layui-input">
  473. </th>
  474. {/if}
  475. {if $field.charge_standard == 1}
  476. <th class="form-title">收费标准</th>
  477. <th colspan="2">
  478. <input type="text" name="charge_standard" value="{$detail.charge_standard}" autocomplete="off"
  479. placeholder="请输入收费标准"
  480. {if $field_edit.charge_standard_edit != 1}
  481. readonly
  482. {/if}
  483. class="layui-input">
  484. </th>
  485. {/if}
  486. </tr>
  487. {if $field.entrust_unit == 1 || $field.entrust_head == 1 || $field.sent_review_unit == 1 || $field.sent_review_head == 1
  488. || $field.review_unit == 1 || $field.review_head == 1 || $field.operate_name == 1 || $field.operate_team_names == 1}
  489. <tr>
  490. <th colspan="9" class="forleft">相关单位</th>
  491. </tr>
  492. <tr>
  493. {if $field.entrust_unit == 1}
  494. <th class="form-title">委托单位</th>
  495. <th>
  496. {$detail.entrust_unit_name}
  497. </th>
  498. {/if}
  499. {if $field.entrust_head == 1}
  500. <th class="form-title">负责人</th>
  501. <th>
  502. {$detail.entrust_maker_name}
  503. </th>
  504. {/if}
  505. {if $field.sent_review_unit == 1}
  506. <th class="form-title">送审单位</th>
  507. <th>
  508. {$detail.sent_review_unit_name}
  509. </th>
  510. {/if}
  511. {if $field.sent_review_head == 1}
  512. <th class="form-title">负责人</th>
  513. <th colspan="2">
  514. {$detail.sent_review_head_name}
  515. </th>
  516. {/if}
  517. </tr>
  518. <tr>
  519. {if $field.review_unit == 1}
  520. <th class="form-title">评审机构</th>
  521. <th>
  522. {$detail.review_unit_name}
  523. </th>
  524. {/if}
  525. {if $field.review_head == 1}
  526. <th class="form-title">项目负责人</th>
  527. <th>
  528. {$detail.review_head_name}
  529. </th>
  530. {/if}
  531. {if $field.operate_name == 1}
  532. <th class="form-title">作业负责人</th>
  533. <th>
  534. {$detail.operate_head_name}
  535. </th>
  536. {/if}
  537. {if $field.operate_team_names == 1}
  538. <th class="form-title">作业成员</th>
  539. <th colspan="2">
  540. {$detail.operate_team_names}
  541. </th>
  542. {/if}
  543. </tr>
  544. {/if}
  545. <tr>
  546. <th colspan="9" class="forleft">金额详情</th>
  547. </tr>
  548. <tr>
  549. {if $field.sent_review_amount == 1}
  550. <th class="form-title" colspan="1">送审金额(元)</th>
  551. <th colspan="2">
  552. <input type="text" id="sent_review_amount" name="sent_review_amount" onkeyup="Add()"
  553. value="{$detail.sent_review_amount}" autocomplete="off" placeholder="请输入送审金额"
  554. {if $field_edit.sent_review_amount_edit != 1}
  555. readonly
  556. {/if}
  557. class="layui-input">
  558. </th>
  559. {/if}
  560. {if $field.review_add_reduce_amount == 1}
  561. <th class="form-title" colspan="1">审增金额(元)</th>
  562. <th colspan="2">
  563. <input type="text" id="review_add_amount" name="review_add_amount" value="{$detail.review_add_amount}" onkeyup="Add()"
  564. autocomplete="off" placeholder="请输入审增额"
  565. {if $field_edit.authorize_amount_edit != 1}
  566. readonly
  567. {/if}
  568. class="layui-input">
  569. </th>
  570. {/if}
  571. {if $field.review_add_reduce_amount == 1}
  572. <th class="form-title" colspan="1">审减金额(元)</th>
  573. <th colspan="2">
  574. <input type="text" id="review_reduce_amount" name="review_reduce_amount" value="{$detail.review_reduce_amount}" onkeyup="Add()"
  575. autocomplete="off" placeholder="请输入审减额"
  576. {if $field_edit.authorize_amount_edit != 1}
  577. readonly
  578. {/if}
  579. class="layui-input">
  580. </th>
  581. {/if}
  582. </tr>
  583. <tr>
  584. {if $field.authorize_amount == 1}
  585. <th class="form-title" colspan="1">审定金额(元)</th>
  586. <th colspan="2" style="text-align: left;">
  587. <input type="text" id="authorize_amount" name="authorize_amount" value="{$detail.authorize_amount}" onkeyup="Add()"
  588. autocomplete="off" placeholder="请输入审定金额"
  589. {if $field_edit.authorize_amount_edit != 1}
  590. readonly
  591. {/if}
  592. class="layui-input">
  593. </th>
  594. {/if}
  595. {if $field.review_add_reduce_rate == 1}
  596. <th class="form-title" colspan="1">审增减率(%)</th>
  597. <th colspan="2">
  598. <span id="review_add_reduce_rate">{$detail.review_add_reduce_rate}</span>
  599. <input type="hidden" name="review_add_reduce_rate" value="{$detail.review_add_reduce_rate}" autocomplete="off" placeholder="请输入审增减率" class="layui-input">
  600. </th>
  601. {/if}
  602. {if $field.sent_review_cost == 1}
  603. <th class="form-title" colspan="1">送审服务费 (元)</th>
  604. <th colspan="2" style="text-align: left;">
  605. <input type="text" name="sent_review_cost" value="{$detail.sent_review_cost}" autocomplete="off" placeholder="请输入送审服务费"
  606. {if $field_edit.sent_review_cost_edit != 1}
  607. readonly
  608. {/if}
  609. class="layui-input">
  610. </th>
  611. {/if}
  612. </tr>
  613. <!-- <tr>
  614. <th class="form-title" colspan="1">报告时间</th>
  615. <th colspan="8" style="text-align: left;">{$detail.report_time}</th>
  616. </tr>-->
  617. <tr>
  618. <th colspan="9" class="forleft">相关附件
  619. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-on="test-iframe-handle" style="float: right;">
  620. 上传附件
  621. <span id="ID-test-iframe-mark"></span>
  622. </button>
  623. </th>
  624. </tr>
  625. <tr>
  626. <th colspan="9" class="fujianimg" style="padding: 0px 0px;">
  627. <div id="filesBox2">
  628. <table class="layui-hide" id="get_file" lay-filter="get_file"></table>
  629. </div>
  630. </th>
  631. </tr>
  632. </table>
  633. <div class="py-3">
  634. <input type="hidden" name="id" value="{$detail.id}"/>
  635. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="save">保存</button>
  636. </div>
  637. </form>
  638. <script>
  639. //审定金额=送审金额+审增金额+审减金额
  640. //(审定金额-送审金额)/送审金额*100%
  641. function Add(){
  642. var input1 = 0,input2 = 0,input3 = 0,input4 = 0;
  643. input1 = Number(document.getElementById("sent_review_amount").value).toFixed(2);
  644. input2 = Number(document.getElementById("authorize_amount").value).toFixed(2);
  645. // input3 = Number(document.getElementById("review_add_amount").value).toFixed(2);
  646. // input4 = Number(document.getElementById("review_reduce_amount").value).toFixed(2);
  647. if (input1!=="0.00" && input2!=="0.00") {
  648. var aa= (input2-input1).toFixed(2);
  649. var bb = aa/input1*100;
  650. bb = bb.toFixed(2);
  651. $('[name="review_add_reduce_rate"]').val(bb);
  652. $('#review_add_reduce_rate').html(bb)
  653. }else {
  654. $('[name="review_add_reduce_rate"]').val('0.00');
  655. $('#review_add_reduce_rate').html('0.00')
  656. }
  657. // 总审定金额-总送审金额
  658. }
  659. function first() {
  660. var form = layui.form, tool = layui.tool, oaTool = layui.oaTool;
  661. let table = layui.table;
  662. //附件表格
  663. var allcount;
  664. parent.layui.get_fileTable = table.render({
  665. elem: '#get_file',
  666. title: '文档列表',
  667. toolbar: '#toolbarget_file',
  668. cellMinWidth: 80,
  669. parseData: function (res) { // 数据解析回调函数
  670. // 在这里可以获取数据总数
  671. allcount = res.data.length;
  672. return {
  673. code: res.code, // 数据状态码
  674. msg: res.msg, // 状态信息
  675. count: res.count, // 数据总数
  676. data: res.data // 当前页数据
  677. };
  678. },
  679. // className: 'layui-table-testcss', // 用于给表格主容器追加 css 类名
  680. // lineStyle: 'height: 151px;', // 定义表格的多行样式
  681. url: "/admin/project.api/get_file",
  682. where: {'id': project_id},
  683. page: true, //开启分页
  684. limit: 20,
  685. cols: [[
  686. {field: 'id', title: '序号', width: 80, align: 'center',
  687. templet: function (d) {
  688. console.log(allcount,d.LAY_NUM)
  689. return allcount - (d.LAY_NUM - 1);
  690. }
  691. },
  692. {field: 'name', title: '附件名称', align: 'left',
  693. },
  694. {field: 'remark', title: '附件说明', align: 'left',
  695. },
  696. {field: 'admin_name', title: '上传人', align: 'center', width: 150},
  697. {field: 'create_time', title: '上传时间', align: 'center', width: 150,
  698. templet:"<div>{{layui.util.toDateString(d.create_time*1000, 'yyyy-MM-dd HH:mm:ss')}}</div>"},
  699. {field: 'right', fixed: 'right', title: '操作', width: 150, align: 'center',
  700. templet: function (d) {
  701. var html = '<div class="layui-btn-group">';
  702. var btn1 = `<a href="https://view.officeapps.live.com/op/view.aspx?src=${d.filepath}" target="_blank" class="layui-btn layui-btn-xs">预览</a>`;
  703. var btn2 = `<a class="layui-btn layui-btn-xs layui-bg-blue" href="${d.filepath}" download="${d.name}" lay-event="">下载</a>`;
  704. var btn3 = `<span data-id="${d.id}" class="layui-btn layui-btn-xs layui-btn-danger file-del ">删除</span>`;
  705. return html + btn1 + btn2 + btn3 +'</div>';
  706. }
  707. }
  708. ]]
  709. });
  710. //上传附件弹出窗
  711. layui.use(function(){
  712. var $ = layui.$;
  713. var layer = layui.layer;
  714. var upload = layui.upload;
  715. var util = layui.util;
  716. // 事件
  717. util.on('lay-on', {
  718. 'test-iframe-handle': function(){
  719. layer.open({
  720. type: 2,
  721. area: ['680px', '520px'],
  722. content: 'ceshi?id={$detail.id}',
  723. fixed: false, // 不固定
  724. maxmin: true,
  725. shadeClose: true,
  726. title: '上传附件',
  727. btnAlign: 'c',
  728. yes: function(index, layero){
  729. // 获取 iframe 的窗口对象
  730. var iframeWin = window[layero.find('iframe')[0]['name']];
  731. var elemMark = iframeWin.$('#mark'); // 获得 iframe 中某个输入框元素
  732. var value = elemMark.val();
  733. if($.trim(value) === '') return elemMark.focus();
  734. // 显示获得的值
  735. layer.msg('获得 iframe 中的输入框标记值:'+ value);
  736. }
  737. });
  738. },
  739. })
  740. });
  741. let adress;
  742. //日期选择
  743. layui.laydate.render({
  744. elem: '#date',
  745. range: ['#start_time', '#end_time'],
  746. rangeLinked: true
  747. });
  748. let c = 1;
  749. //监听提交
  750. form.on('submit(save)', function (data) {
  751. if(c){
  752. let callback = function (e) {
  753. c = 1
  754. layer.msg(e.msg);
  755. if (e.code == 0) {
  756. tool.sideClose(1000);
  757. }
  758. }
  759. var engineering_type1 ='';
  760. if(data.field.engineering_type1==1){
  761. engineering_type1 ='预算';
  762. }else if(data.field.engineering_type1==2){
  763. engineering_type1 ='结算';
  764. }else if(data.field.engineering_type1==3){
  765. engineering_type1 ='概算';
  766. }else if(data.field.engineering_type1==4){
  767. engineering_type1 ='决算';
  768. }else if(data.field.engineering_type1==5){
  769. engineering_type1 ='工程总承包(EPC)';
  770. }
  771. var engineering_type2 = '';
  772. if(data.field.engineering_type2==1){
  773. engineering_type2 ='审核';
  774. }else if(data.field.engineering_type2==2) {
  775. engineering_type2 = '编制';
  776. }
  777. if(engineering_type1!==""&&engineering_type2!==""){
  778. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  779. }
  780. tool.post("/admin/project.cost_company/edit", data.field, callback);
  781. }
  782. c = 0
  783. return false;
  784. });
  785. oaTool.addFile({
  786. type: 1,
  787. isSave: true,
  788. ajaxSave: function (res) {
  789. let callback = function (e) {
  790. if(e.code == 202){
  791. layer.msg(e.msg);
  792. }else{
  793. layer.msg('上传成功!');
  794. }
  795. setTimeout(function () {
  796. $("#filesBox2").load(location.href+" #filesBox>*","type=2")
  797. }, 500)
  798. }
  799. // console.log(res,"{$detail.id}")
  800. tool.post("/admin/project.api/add_file_company", {
  801. 'topic_id': "{$detail.id}",
  802. 'file_id': res.data.id,
  803. 'file_name': res.data.name,
  804. 'module': 'project'
  805. }, callback);
  806. }
  807. });
  808. $('#filesBox2').on('click', '.file-del', function () {
  809. let id = $(this).parent().parent().data('id');
  810. layer.confirm('确定要删除该文件吗?请慎重', {icon: 3, title: '提示'}, function (index) {
  811. let callback = function (e) {
  812. $("#" + id + "").remove();
  813. layer.closeAll();
  814. layer.msg(e.msg);
  815. $('[lay-filter="webform"]').click();
  816. }
  817. tool.delete("/admin/project.api/delete_file_company", {id: id}, callback);
  818. });
  819. })
  820. layui.use(['form', 'jquery'], function () {
  821. var form = layui.form;
  822. const $ = layui.jquery;
  823. let adress;
  824. $.ajax({
  825. type: "get", //使用get方式
  826. url: "/static/assets/layui/adress.json", //json文件相对于这个HTML的路径
  827. dataType: "json",
  828. async: false,
  829. success: function (data) {
  830. //这个data就是json数据
  831. adress = data
  832. var province = Object.keys(adress)
  833. var proStrs = '<option value="">省</option>';
  834. for (var i = 0; i < province.length; i++) {
  835. proStrs += '<option value="' + province[i] + '">' + province[i] + '</option>';
  836. }
  837. $("#province").html(proStrs);
  838. layui.form.render("select")
  839. },
  840. error: function () {
  841. layer.alert("地址请求失败!! ");
  842. }
  843. });
  844. function getFirstAttr(obj) {
  845. for (var k in obj) return k;
  846. }
  847. function selectOption(selectedProvince, selectedCity = '', selectedArea = '') {
  848. var proStr = '<option value="">省</option>', cityStr = '<option value="">市</option>',
  849. areaStr = '<option value="">县</option>';
  850. var pro = adress[selectedProvince], ci = adress[selectedProvince][selectedCity];
  851. for (var province in adress) {
  852. if (province == selectedProvince) proStr += '<option value="' + province + '" selected>' + province + '</option>';
  853. else proStr += '<option value="' + province + '">' + province + '</option>';
  854. }
  855. $("#province").html(proStr);
  856. for (var city in pro) {
  857. if (city == selectedCity) cityStr += '<option value="' + city + '" selected>' + city + '</option>';
  858. else cityStr += '<option value="' + city + '">' + city + '</option>';
  859. }
  860. $("#city").html(cityStr);
  861. for (var area in ci) {
  862. if (area == "remove") {
  863. continue;
  864. }
  865. if (ci[area] == selectedArea) areaStr += '<option value="' + ci[area] + '" selected>' + ci[area] + '</option>';
  866. else areaStr += '<option value="' + ci[area] + '">' + ci[area] + '</option>';
  867. }
  868. $("#area").html(areaStr);
  869. form.render();
  870. }
  871. /*selectOption(1,2, 3);*/
  872. form.on('select(province)', function (data) {
  873. let thisProvince = data.value;
  874. let thisCity = getFirstAttr(adress[thisProvince]);
  875. selectOption(data.value);
  876. });
  877. form.on('select(city)', function (data) {
  878. selectOption($("#province").val(), data.value, getFirstAttr(data.value));
  879. });
  880. selectOption("{$detail.province}","{$detail.city}","{$detail.area}")
  881. })
  882. }
  883. </script>
  884. <script>
  885. // 获取具有指定 ID 的 <ul> 元素
  886. var ulElement = document.getElementById("filesBox");
  887. // 检查 <ul> 元素的子元素数量
  888. if (ulElement.children.length === 0) {
  889. // 如果子元素数量为 0,隐藏 <ul> 元素
  890. ulElement.style.display = "none";
  891. }
  892. </script>