edit_first.html 34 KB

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