edit.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. {extend name="common/base"/}
  2. {block name="style"}
  3. <style>
  4. .footer{
  5. display: none;
  6. }
  7. .heading th {
  8. text-align: center;
  9. }
  10. .form td {
  11. text-align: center;
  12. }
  13. /* 日志 */
  14. .log_top {
  15. padding-left: 1vw;
  16. }
  17. .log_top span {
  18. margin: 0 0.5vw;
  19. }
  20. /* 1,1,1 */
  21. .log_commentary {
  22. color: rgb(0, 176, 80);
  23. }
  24. .log_company {
  25. color: rgb(255, 33, 0);
  26. }
  27. .log_content {
  28. width: fit-content;
  29. margin: 0.3vw 1.5vw 1vw 1.5vw;
  30. padding: 0.5vw 0vw;
  31. text-indent: 1.2em;
  32. line-height: 2.1vh;
  33. background-color: rgb(255, 255, 255);
  34. border-radius: 0.5vw;
  35. box-shadow: 0.19vw 0.16vw 0.4vw 0.03vw rgba(0, 0, 0, 0.13);
  36. }
  37. .log_content_color {
  38. /* background-color: rgb(250,250,250); */
  39. }
  40. .log_content_img img {
  41. /* width: 10%; */
  42. border-radius: 0.5vw;
  43. margin: 0.3vw 0;
  44. padding-right: 18px;
  45. padding-bottom: 7px;
  46. padding-left: 2px;
  47. }
  48. .log_item_top {
  49. height: 70%;
  50. overflow: scroll;
  51. }
  52. .log_item_top {
  53. height: 60vh;
  54. /* background-color: rgb(255, 255, 255); */
  55. }
  56. .log_item_bottom {
  57. display: flex;
  58. /* height: 17vh; */
  59. /* border-top: 1px solid #eee; */
  60. margin: 0 1.5vw;
  61. /* background-color: rgb(250,250,250); */
  62. }
  63. .log_input input {
  64. width: 55vw;
  65. height: 10vh;
  66. border: #eee 1px solid;
  67. }
  68. .log_bottom_img {
  69. /* height: 5vh; */
  70. }
  71. .log_bottom_img img {
  72. height: 4vw;
  73. width: 6vw;
  74. border-radius: 0.5vw;
  75. margin: 0.5vw 0vw 0.5vw 0.3vw;
  76. }
  77. .log_bottom_left {
  78. width: 100%;
  79. margin-top: 1.5vh;
  80. }
  81. .log_bottom_right {
  82. width: 5%;
  83. }
  84. /* 上传图片 */
  85. .layui-upload-drag-self {
  86. background-color: #fbfdff;
  87. border: 1px dashed #c0ccda;
  88. border-radius: 6px;
  89. box-sizing: border-box;
  90. line-height: 4vw;
  91. vertical-align: top;
  92. display: inline-block;
  93. text-align: center;
  94. cursor: pointer;
  95. outline: 0;
  96. margin-right: 13px;
  97. float: left;
  98. }
  99. .layui-input-inlines-self {
  100. position: relative;
  101. margin-left: 90px;
  102. min-height: 36px;
  103. text-align: left;
  104. }
  105. .layui-upload-drag-self .layui-icon {
  106. font-size: 28px;
  107. color: #8c939d
  108. }
  109. .layui-upload-drag-self .img {
  110. position: relative;
  111. height: 148px;
  112. width: 148px;
  113. }
  114. .layui-upload-img {
  115. width: 148px;
  116. height: 148px;
  117. border-radius: 6px;
  118. margin-top: -3px;
  119. margin-left: -2px;
  120. }
  121. .handle {
  122. position: absolute;
  123. width: 148px;
  124. height: 100%;
  125. z-index: 100;
  126. border-radius: 6px;
  127. top: 0;
  128. background: rgba(59, 60, 61, 0.6);
  129. text-align: center;
  130. }
  131. .handle .icon-myself {
  132. z-index: 999;
  133. transition: all .3s;
  134. cursor: pointer;
  135. font-size: 25px;
  136. width: 25px;
  137. color: rgba(255, 255, 255, 0.91);
  138. margin: 0 4px;
  139. }
  140. .log_textarea {
  141. width: 89vw;
  142. height: 8vh;
  143. padding: 0.5vw;
  144. /* margin-right: 2vw; */
  145. margin: 1vw;
  146. }
  147. .log_button_img {
  148. width: 2vw;
  149. }
  150. .log_card {
  151. border: none !important;
  152. }
  153. /* 点击图片放大 */
  154. .content_img img {
  155. max-width: 100%;
  156. cursor: pointer;
  157. }
  158. .overlay {
  159. display: none;
  160. position: fixed;
  161. top: 0;
  162. left: 0;
  163. width: 100%;
  164. height: 100%;
  165. background-color: rgba(0, 0, 0, 0.7);
  166. justify-content: center;
  167. z-index: 1;
  168. }
  169. .overlay img {
  170. margin-top: 4%;
  171. max-width: 90%;
  172. max-height: 90%;
  173. object-fit: contain;
  174. }
  175. .p-4 {
  176. background-color: rgb(255, 255, 255);
  177. }
  178. /*表格*/
  179. #tabniubi {
  180. width: 100%;
  181. margin: 10px 0;
  182. background-color: #fff;
  183. color: #5f5f5f;
  184. }
  185. #tabniubi th {
  186. padding: 9px 15px;
  187. min-height: 20px;
  188. height: 40px !important;
  189. text-align: center;
  190. /* font-size: 14px; */
  191. border-width: 1px;
  192. border-style: solid;
  193. border-color: #e2e2e2;
  194. font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
  195. }
  196. #tabniubi tr:first-child {
  197. padding: 0;
  198. min-height: 0;
  199. line-height: 0;
  200. border-width: 0;
  201. border-style: none;
  202. border-color: #fff;
  203. font-size: 0;
  204. }
  205. #tabniubi tr:first-child th {
  206. padding: 0;
  207. min-height: 0;
  208. line-height: 0;
  209. border-width: 0;
  210. border-style: none;
  211. border-color: #fff;
  212. font-size: 0;
  213. }
  214. .form-title {
  215. background-color: rgb(241, 241, 241);
  216. color: rgb(95, 95, 95);
  217. border-color: rgb(241, 241, 241);
  218. font-weight: 600;
  219. }
  220. /* .fujianimg img {
  221. width: 5vw;
  222. height: 5vh;
  223. } */
  224. .forleft {
  225. text-align: left !important;
  226. }
  227. /* .forright{
  228. text-align:right !important;
  229. } */
  230. .layui-form-select dl dd.layui-this {
  231. background-color: #f8f8f8;
  232. color: rgb(23, 145, 233);
  233. font-weight: 700;
  234. }
  235. .layui-input, .layui-textarea {
  236. /* padding-left: 3.75vw; */
  237. color: #5f5f5f;
  238. }
  239. .upimg {
  240. width: 250px;
  241. height: 250px;
  242. }
  243. /* .fujianimg img {
  244. height: 5.5vh;
  245. } */
  246. .filelist{
  247. width: 100%;
  248. overflow: auto;
  249. justify-content:flex-start;
  250. align-content: space-between;
  251. flex-direction: column-reverse;
  252. flex-wrap: wrap;
  253. display: flex;
  254. }
  255. .filelist li{
  256. padding: 0.5vw 0.8vw 0.5vw 0.8vw;
  257. white-space: nowrap;
  258. overflow: hidden;
  259. text-overflow: ellipsis;
  260. display: inline-block;
  261. border-right: 1px solid #e2e2e2;
  262. float: left;
  263. font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
  264. }
  265. .filelist p{
  266. margin: 3px 0 5px 0;
  267. width: 7vw;
  268. overflow: hidden;
  269. text-overflow: ellipsis;
  270. text-align: center;
  271. font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
  272. }
  273. #filesBox2 li{
  274. padding: 0.5vw 0.8vw 0.5vw 0.8vw;
  275. white-space: nowrap;
  276. overflow: hidden;
  277. text-overflow: ellipsis;
  278. display: inline-block;
  279. border-right: 1px solid #e2e2e2;
  280. float: left;
  281. font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
  282. }
  283. /* 倒计时 */
  284. .countdown {
  285. height: 8.5vh;
  286. width: 6.5vw;
  287. font-size: 1vw;
  288. text-align: center;
  289. border: 1px solid #eee;
  290. }
  291. .countdown-top {
  292. height: 3.5vh;
  293. line-height: 3.5vh;
  294. border-bottom: 1px solid #eee;
  295. color: #fff;
  296. background-color: rgb(23, 145, 233);
  297. border-bottom: 1px solid rgb(23, 145, 233);
  298. font-size: 0.95vw;
  299. padding: 0;
  300. margin: 0;
  301. }
  302. .countdown-bottom {
  303. height: 5vh;
  304. line-height: 5vh;
  305. padding: 0;
  306. margin: 0;
  307. background-color: #fff;
  308. }
  309. /* 项目名称下面的字体变大 */
  310. .ziti{
  311. font-size: 1vw;
  312. }
  313. </style>
  314. {/block}
  315. <!-- 主体 -->
  316. {block name="body"}
  317. <div class="layui-form p-4">
  318. <div class="layui-row layui-col-space12">
  319. <div class="layui-col-md10" style="padding: 0;">
  320. <div class="layui-col-md12" style="padding: 8px;">
  321. <h1>{$detail.project_name}</h1>
  322. </div>
  323. <div class="layui-col-md3" style="padding: 8px;font-size:1.1vw;">
  324. {$detail.project_num}
  325. </div>
  326. <div class="layui-col-md3" style="padding: 8px;font-size:1.1vw;">
  327. {if $detail.unit_type==0}
  328. {$detail.review_unit_name}
  329. {elseif $detail.unit_type==2}
  330. {$detail.entrust_unit_name}
  331. {/if}
  332. </div>
  333. <div class="layui-col-md3" style="padding: 8px;font-size:1.1vw;">
  334. {if $detail.maker_type==2}创建时间于:{$detail.create_time|date="Y-m-d"}
  335. {else}接收时间于:{if $detail.project_receive_time==0}未接收{else}{$detail.project_receive_time|date="Y-m-d"}{/if}
  336. {/if}
  337. </div>
  338. </div>
  339. <div class="layui-col-md1" style="padding: 0;">
  340. <div class="layui-card countdown">
  341. <div class="countdown-top" style="\font-size:1.1vw;">
  342. {if $detail.project_end_time>time()}剩 余{else}逾 期{/if}
  343. </div>
  344. <div class="countdown-bottom" style="font-size:1.1vw;">
  345. {$advent_time}
  346. </div>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. <div class="layui-tab layui-tab-card" lay-filter="test-hash" style="margin: 0;">
  352. <ul class="layui-tab-title">
  353. <li class="layui-this" lay-id="11">项目概览</li>
  354. {if $project_five.project_user == 1}
  355. <li data-load="" data-id="4">项目人员</li>
  356. {/if}
  357. {if $project_five.project_report == 1}
  358. <li data-load="" data-id="3">项目报告</li>
  359. {/if}
  360. {if $project_five.project_contact == 1}
  361. <li data-load="" data-id="7">联系函</li>
  362. {/if}
  363. {if $project_five.project_comments == 1}
  364. <li lay-id="22" data-id="1">作业日志</li>
  365. {/if}
  366. {if $project_five.project_record == 1}
  367. <li data-load="" data-id="2">工作记录</li>
  368. {/if}
  369. <li data-load="" data-id="8">预约看现场</li>
  370. {if $project_five.project_log == 1}
  371. <li data-load="" data-id="5">项目动态</li>
  372. {/if}
  373. </ul>
  374. <div class="layui-tab-content">
  375. <div class="layui-tab-item layui-show">
  376. {include file="/project/cost/edit_first"/}
  377. </div>
  378. {if $project_five.project_user == 1}
  379. <div class="layui-tab-item">
  380. {include file="/project/cost/edit_user" /}
  381. </div>
  382. {/if}
  383. {if $project_five.project_report == 1}
  384. <div class="layui-tab-item">
  385. {include file="/project/cost/edit_report" /}
  386. </div>
  387. {/if}
  388. {if $project_five.project_contact == 1}
  389. <div class="layui-tab-item">
  390. {include file="/project/cost/edit_contact" /}
  391. </div>
  392. {/if}
  393. {if $project_five.project_comments == 1}
  394. <div class="layui-tab-item" >
  395. {include file="/project/cost/edit_comments"/}
  396. </div>
  397. {/if}
  398. {if $project_five.project_record == 1}
  399. <div class="layui-tab-item">
  400. {include file="/project/cost/edit_record" /}
  401. </div>
  402. {/if}
  403. <div class="layui-tab-item">
  404. {include file="/project/cost/edit_appointment" /}
  405. </div>
  406. {if $project_five.project_log == 1}
  407. <div class="layui-tab-item">
  408. {include file="/project/projectlog/index" /}
  409. </div>
  410. {/if}
  411. </div>
  412. </div>
  413. {/block}
  414. <!-- /主体 -->
  415. <!-- 脚本 -->
  416. {block name="script"}
  417. <script>
  418. const moduleInit = ['tool','oaTool','employeepicker'];
  419. var project_id = '{$project_id}'
  420. function gouguInit() {
  421. var form = layui.form,tool=layui.tool,upload = layui.upload;
  422. var element = layui.element;
  423. first()
  424. eliminate(1)
  425. element.on('tab(test-hash)', function (data) {
  426. let index = $(this).attr('data-id');
  427. console.log(index)
  428. if (index == 1) {
  429. eliminate(2)
  430. comment()
  431. } else if (index == 2) {
  432. eliminate(3)
  433. record(index);
  434. } else if (index == 3) {
  435. eliminate(4)
  436. report(index);
  437. } else if (index == 4) {
  438. eliminate(5)
  439. project_user(index)
  440. } else if (index == 5) {
  441. } else if (index == 6) {
  442. }else if (index == 7) {
  443. eliminate(6)
  444. contact(index)
  445. } else if (index == 8) {
  446. appointment();
  447. }
  448. });
  449. //清除小红点
  450. function eliminate(type){
  451. let call=function (e){
  452. //写清除红点的js
  453. }
  454. tool.post("/admin/project.api/eliminate", {type: type},call)
  455. }
  456. //看报告
  457. $('[lay-data="readreport"]').click(function (){
  458. var id = $(this).attr('data-id');
  459. parent.layui.tool.side('/admin/project.report/view/id/' + id); // 项目id
  460. })
  461. let a = 1;
  462. //监听提交
  463. form.on('submit(webform)', function (data) {
  464. if(a){
  465. let callback = function (e) {
  466. a = 1
  467. layer.msg(e.msg);
  468. if (e.code == 0) {
  469. tool.sideClose(1000);
  470. }
  471. }
  472. var engineering_type1 ='';
  473. if(data.field.engineering_type1==1){
  474. engineering_type1 ='预算';
  475. }else if(data.field.engineering_type1==2){
  476. engineering_type1 ='结算';
  477. }else if(data.field.engineering_type1==3){
  478. engineering_type1 ='概算';
  479. }else if(data.field.engineering_type1==4){
  480. engineering_type1 ='决算';
  481. }else if(data.field.engineering_type1==5){
  482. engineering_type1 ='工程总承包(EPC)';
  483. }
  484. var engineering_type2 = '';
  485. if(data.field.engineering_type2==1){
  486. engineering_type2 ='审核';
  487. }else if(data.field.engineering_type2==2) {
  488. engineering_type2 = '编制';
  489. }
  490. if(engineering_type1!==""&&engineering_type2!==""){
  491. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  492. }
  493. tool.post("/admin/project.cost/edit", data.field, callback);
  494. }
  495. a = 0
  496. return false;
  497. });
  498. form.on('submit(save)', function (data) {
  499. if(a){
  500. let callback = function (e) {
  501. a = 1
  502. layer.msg(e.msg);
  503. if (e.code == 0) {
  504. tool.sideClose(1000);
  505. }
  506. }
  507. var engineering_type1 ='';
  508. if(data.field.engineering_type1==1){
  509. engineering_type1 ='预算';
  510. }else if(data.field.engineering_type1==2){
  511. engineering_type1 ='结算';
  512. }else if(data.field.engineering_type1==3){
  513. engineering_type1 ='概算';
  514. }else if(data.field.engineering_type1==4){
  515. engineering_type1 ='决算';
  516. }else if(data.field.engineering_type1==5){
  517. engineering_type1 ='工程总承包(EPC)';
  518. }
  519. var engineering_type2 = '';
  520. if(data.field.engineering_type2==1){
  521. engineering_type2 ='审核';
  522. }else if(data.field.engineering_type2==2) {
  523. engineering_type2 = '编制';
  524. }
  525. if(engineering_type1!==""&&engineering_type2!==""){
  526. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  527. }
  528. tool.post("/admin/project.cost/save", data.field, callback);
  529. }
  530. a = 0
  531. return false;
  532. });
  533. form.on('submit(withdraw)', function (data) {
  534. if(a){
  535. let callback = function (e) {
  536. a = 1
  537. layer.msg(e.msg);
  538. if (e.code == 0) {
  539. tool.sideClose(1000);
  540. }
  541. }
  542. var engineering_type1 ='';
  543. if(data.field.engineering_type1==1){
  544. engineering_type1 ='预算';
  545. }else if(data.field.engineering_type1==2){
  546. engineering_type1 ='结算';
  547. }else if(data.field.engineering_type1==3){
  548. engineering_type1 ='概算';
  549. }else if(data.field.engineering_type1==4){
  550. engineering_type1 ='决算';
  551. }else if(data.field.engineering_type1==5){
  552. engineering_type1 ='工程总承包(EPC)';
  553. }
  554. var engineering_type2 = '';
  555. if(data.field.engineering_type2==1){
  556. engineering_type2 ='审核';
  557. }else if(data.field.engineering_type2==2) {
  558. engineering_type2 = '编制';
  559. }
  560. if(engineering_type1!==""&&engineering_type2!==""){
  561. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  562. }
  563. tool.post("/admin/project.cost/withdraw", data.field, callback);
  564. }
  565. a = 0
  566. return false;
  567. });
  568. form.on('submit(savetime)', function (data) {
  569. if(a){
  570. let callback = function (e) {
  571. a = 1
  572. layer.msg(e.msg);
  573. if (e.code == 0) {
  574. tool.sideClose(1000);
  575. }
  576. }
  577. var engineering_type1 ='';
  578. if(data.field.engineering_type1==1){
  579. engineering_type1 ='预算';
  580. }else if(data.field.engineering_type1==2){
  581. engineering_type1 ='结算';
  582. }else if(data.field.engineering_type1==3){
  583. engineering_type1 ='概算';
  584. }else if(data.field.engineering_type1==4){
  585. engineering_type1 ='决算';
  586. }else if(data.field.engineering_type1==5){
  587. engineering_type1 ='工程总承包(EPC)';
  588. }
  589. var engineering_type2 = '';
  590. if(data.field.engineering_type2==1){
  591. engineering_type2 ='审核';
  592. }else if(data.field.engineering_type2==2) {
  593. engineering_type2 = '编制';
  594. }
  595. if(engineering_type1!==""&&engineering_type2!==""){
  596. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  597. }
  598. tool.post("/admin/project.cost/edit", data.field, callback);
  599. }
  600. a = 0
  601. return false;
  602. });
  603. }
  604. </script>
  605. {/block}
  606. <!-- /脚本 -->