edit.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  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. <!-- 相当于组件-->
  376. <div class="layui-tab-item layui-show">
  377. {include file="/project/cost/edit_first"/}
  378. </div>
  379. {if $project_five.project_user == 1}
  380. <div class="layui-tab-item">
  381. {include file="/project/cost/edit_user" /}
  382. </div>
  383. {/if}
  384. {if $project_five.project_report == 1}
  385. <div class="layui-tab-item">
  386. {include file="/project/cost/edit_report" /}
  387. </div>
  388. {/if}
  389. {if $project_five.project_contact == 1}
  390. <div class="layui-tab-item">
  391. {include file="/project/cost/edit_contact" /}
  392. </div>
  393. {/if}
  394. {if $project_five.project_comments == 1}
  395. <div class="layui-tab-item" >
  396. {include file="/project/cost/edit_comments"/}
  397. </div>
  398. {/if}
  399. {if $project_five.project_record == 1}
  400. <div class="layui-tab-item">
  401. {include file="/project/cost/edit_record" /}
  402. </div>
  403. {/if}
  404. <div class="layui-tab-item">
  405. {include file="/project/cost/edit_appointment" /}
  406. </div>
  407. {if $project_five.project_log == 1}
  408. <div class="layui-tab-item">
  409. {include file="/project/projectlog/index" /}
  410. </div>
  411. {/if}
  412. </div>
  413. </div>
  414. {/block}
  415. <!-- /主体 -->
  416. <!-- 脚本 -->
  417. {block name="script"}
  418. <script>
  419. const moduleInit = ['tool','oaTool','employeepicker'];
  420. var project_id = '{$project_id}'
  421. function gouguInit() {
  422. var form = layui.form,tool=layui.tool,upload = layui.upload;
  423. var element = layui.element;
  424. first()
  425. eliminate(1)
  426. element.on('tab(test-hash)', function (data) {
  427. let index = $(this).attr('data-id');
  428. console.log(index)
  429. if (index == 1) {
  430. eliminate(2)
  431. comment()
  432. } else if (index == 2) {
  433. eliminate(3)
  434. record(index);
  435. } else if (index == 3) {
  436. eliminate(4)
  437. report(index);
  438. } else if (index == 4) {
  439. eliminate(5)
  440. project_user(index)
  441. } else if (index == 5) {
  442. } else if (index == 6) {
  443. }else if (index == 7) {
  444. eliminate(6)
  445. contact(index)
  446. } else if (index == 8) {
  447. appointment();
  448. }
  449. });
  450. //清除小红点
  451. function eliminate(type){
  452. let call=function (e){
  453. //写清除红点的js
  454. }
  455. tool.post("/admin/project.api/eliminate", {type: type},call)
  456. }
  457. //看报告
  458. $('[lay-data="readreport"]').click(function (){
  459. var id = $(this).attr('data-id');
  460. parent.layui.tool.side('/admin/project.report/view/id/' + id); // 项目id
  461. })
  462. let a = 1;
  463. //监听提交
  464. form.on('submit(webform)', function (data) {
  465. if(a){
  466. let callback = function (e) {
  467. a = 1
  468. layer.msg(e.msg);
  469. if (e.code == 0) {
  470. tool.sideClose(1000);
  471. }
  472. }
  473. var engineering_type1 ='';
  474. if(data.field.engineering_type1==1){
  475. engineering_type1 ='预算';
  476. }else if(data.field.engineering_type1==2){
  477. engineering_type1 ='结算';
  478. }else if(data.field.engineering_type1==3){
  479. engineering_type1 ='概算';
  480. }else if(data.field.engineering_type1==4){
  481. engineering_type1 ='决算';
  482. }else if(data.field.engineering_type1==5){
  483. engineering_type1 ='工程总承包(EPC)';
  484. }
  485. var engineering_type2 = '';
  486. if(data.field.engineering_type2==1){
  487. engineering_type2 ='审核';
  488. }else if(data.field.engineering_type2==2) {
  489. engineering_type2 = '编制';
  490. }
  491. if(engineering_type1!==""&&engineering_type2!==""){
  492. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  493. }
  494. tool.post("/admin/project.cost/edit", data.field, callback);
  495. }
  496. a = 0
  497. return false;
  498. });
  499. form.on('submit(save)', function (data) {
  500. if(a){
  501. let callback = function (e) {
  502. a = 1
  503. layer.msg(e.msg);
  504. if (e.code == 0) {
  505. tool.sideClose(1000);
  506. }
  507. }
  508. var engineering_type1 ='';
  509. if(data.field.engineering_type1==1){
  510. engineering_type1 ='预算';
  511. }else if(data.field.engineering_type1==2){
  512. engineering_type1 ='结算';
  513. }else if(data.field.engineering_type1==3){
  514. engineering_type1 ='概算';
  515. }else if(data.field.engineering_type1==4){
  516. engineering_type1 ='决算';
  517. }else if(data.field.engineering_type1==5){
  518. engineering_type1 ='工程总承包(EPC)';
  519. }
  520. var engineering_type2 = '';
  521. if(data.field.engineering_type2==1){
  522. engineering_type2 ='审核';
  523. }else if(data.field.engineering_type2==2) {
  524. engineering_type2 = '编制';
  525. }
  526. if(engineering_type1!==""&&engineering_type2!==""){
  527. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  528. }
  529. tool.post("/admin/project.cost/save", data.field, callback);
  530. }
  531. a = 0
  532. return false;
  533. });
  534. form.on('submit(withdraw)', function (data) {
  535. if(a){
  536. let callback = function (e) {
  537. a = 1
  538. layer.msg(e.msg);
  539. if (e.code == 0) {
  540. tool.sideClose(1000);
  541. }
  542. }
  543. var engineering_type1 ='';
  544. if(data.field.engineering_type1==1){
  545. engineering_type1 ='预算';
  546. }else if(data.field.engineering_type1==2){
  547. engineering_type1 ='结算';
  548. }else if(data.field.engineering_type1==3){
  549. engineering_type1 ='概算';
  550. }else if(data.field.engineering_type1==4){
  551. engineering_type1 ='决算';
  552. }else if(data.field.engineering_type1==5){
  553. engineering_type1 ='工程总承包(EPC)';
  554. }
  555. var engineering_type2 = '';
  556. if(data.field.engineering_type2==1){
  557. engineering_type2 ='审核';
  558. }else if(data.field.engineering_type2==2) {
  559. engineering_type2 = '编制';
  560. }
  561. if(engineering_type1!==""&&engineering_type2!==""){
  562. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  563. }
  564. tool.post("/admin/project.cost/withdraw", data.field, callback);
  565. }
  566. a = 0
  567. return false;
  568. });
  569. form.on('submit(savetime)', function (data) {
  570. if(a){
  571. let callback = function (e) {
  572. a = 1
  573. layer.msg(e.msg);
  574. if (e.code == 0) {
  575. tool.sideClose(1000);
  576. }
  577. }
  578. var engineering_type1 ='';
  579. if(data.field.engineering_type1==1){
  580. engineering_type1 ='预算';
  581. }else if(data.field.engineering_type1==2){
  582. engineering_type1 ='结算';
  583. }else if(data.field.engineering_type1==3){
  584. engineering_type1 ='概算';
  585. }else if(data.field.engineering_type1==4){
  586. engineering_type1 ='决算';
  587. }else if(data.field.engineering_type1==5){
  588. engineering_type1 ='工程总承包(EPC)';
  589. }
  590. var engineering_type2 = '';
  591. if(data.field.engineering_type2==1){
  592. engineering_type2 ='审核';
  593. }else if(data.field.engineering_type2==2) {
  594. engineering_type2 = '编制';
  595. }
  596. if(engineering_type1!==""&&engineering_type2!==""){
  597. data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
  598. }
  599. tool.post("/admin/project.cost/edit", data.field, callback);
  600. }
  601. a = 0
  602. return false;
  603. });
  604. }
  605. </script>
  606. {/block}
  607. <!-- /脚本 -->