12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486 |
- <?php /*a:10:{s:73:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit.html";i:1723541257;s:59:"D:\phpstudy_pro\WWW\caiping\app\admin\view\common\base.html";i:1723541257;s:79:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_first.html";i:1723541257;s:78:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_user.html";i:1723541257;s:80:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_report.html";i:1723541257;s:81:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_contact.html";i:1723541257;s:77:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_log.html";i:1723541257;s:80:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_record.html";i:1723541257;s:85:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\cost_company\edit_appointment.html";i:1723541257;s:72:"D:\phpstudy_pro\WWW\caiping\app\admin\view\project\projectlog\index.html";i:1723541257;}*/ ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="360-site-verification" content="a7c876fae8b6e3175a52ea9f19543f51" />
- <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
- <script src="/static/dist/xm-select.js"></script>
- <link rel="mobile-prefetch" href=""/>
- <title><?php echo get_system_config('web','admin_title'); ?></title>
- <meta name="keywords" content="<?php echo get_system_config('web','keywords'); ?>"/>
- <meta name="description" content="<?php echo get_system_config('web','desc'); ?>"/>
- <link rel="stylesheet" href="/static/assets/gougu/css/gougu.css?v=<?php echo get_system_config('web','version'); ?>" media="all">
- <style>
- /* 倒计时 */
- .countdown {
- height: 8.5vh;
- width: 6.5vw;
- font-size: 1vw;
- text-align: center;
- border: 1px solid #eee;
- }
- .countdown-top {
- height: 3.5vh;
- line-height: 3.5vh;
- border-bottom: 1px solid #eee;
- color: #fff;
- background-color: rgb(23, 145, 233);
- border-bottom: 1px solid rgb(23, 145, 233);
- font-size: 0.95vw;
- padding: 0;
- margin: 0;
- }
- .countdown-bottom {
- height: 5vh;
- line-height: 5vh;
- padding: 0;
- margin: 0;
- background-color: #fff;
- }
- /* 项目名称下面的字体变大 */
- .ziti{
- font-size: 1vw;
- }
- </style>
- </head>
- <body class="main-body">
- <!-- 主体 -->
-
- <div class="layui-form p-4">
- <div class="layui-row layui-col-space12">
- <div class="layui-col-md10" style="padding: 0;">
- <div class="layui-col-md12" style="padding: 8px;">
- <h1><?php echo htmlentities($detail['project_name']); ?></h1>
- </div>
- <div class="layui-col-md3 ziti" style="padding: 8px;font-size:1.1vw;">
- <?php echo htmlentities($detail['project_num']); ?>
- </div>
- <div class="layui-col-md3 ziti" style="padding: 8px;font-size:1.1vw;">
- <?php if($detail['unit_type']==0): ?>
- <?php echo htmlentities($detail['review_head_name']); elseif($detail['unit_type']==2): ?>
- <?php echo htmlentities($detail['entrust_unit_name']); else: ?>
- <?php endif; ?>
- <!--公司负责人-->
- </div>
- <div class="layui-col-md3 ziti" style="padding: 8px;font-size:1.1vw;">
- <?php if($detail['maker_type']==2): ?>创建时间于:<?php echo htmlentities(date("Y-m-d",!is_numeric($detail['create_time'])? strtotime($detail['create_time']) : $detail['create_time'])); else: ?>接收时间于:<?php if($detail['project_receive_time']==0): ?>未接收<?php else: ?><?php echo htmlentities(date("Y-m-d",!is_numeric($detail['project_receive_time'])? strtotime($detail['project_receive_time']) : $detail['project_receive_time'])); ?><?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <div class="layui-col-md1" style="padding: 0;">
- <div class="layui-card countdown">
- <div class="countdown-top" style="font-weight: 600;font-size:1.1vw;">
- <?php if($detail['project_end_time']>time()): ?>剩 余<?php else: ?>逾 期<?php endif; ?>
- </div>
- <div class="countdown-bottom" style="font-size:1.1vw;">
- <?php echo htmlentities($advent_time); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-tab layui-tab-card" style="margin:0;" lay-filter="project" id="projectTab">
- <ul class="layui-tab-title">
- <li class="layui-this" lay-id="true">项目概览</li>
- <?php if($project_five['project_user'] == 1): ?>
- <li data-load="" data-id="4">项目人员</li>
- <?php endif; if($project_five['project_report'] == 1): ?>
- <li data-load="" data-id="3">项目报告</li>
- <?php endif; if($project_five['project_contact'] == 1): ?>
- <li data-load="" data-id="7">联系函</li>
- <?php endif; if($project_five['project_comments'] == 1): ?>
- <li lay-id="22" data-id="1">作业日志</li>
- <?php endif; if($project_five['project_record'] == 1): ?>
- <li data-load="" data-id="2">工作记录</li>
- <?php endif; ?>
- <li data-load="" data-id="8">预约看现场</li>
- <?php if($project_five['project_log'] == 1): ?>
- <li data-load="" data-id="5">项目动态</li>
- <?php endif; ?>
- </ul>
- <div class="layui-tab-content">
- <div class="layui-tab-item layui-show">
- <style>
- .footer{
- width: 100%;
- height: 25px;
- text-align: center;
- margin-bottom: 0 !important;
- display: none;
- }
- .heading th {
- text-align: center;
- }
- .form td {
- text-align: center;
- }
- /* 日志 */
- .log_top {
- padding-left: 1vw;
- }
- .log_top span {
- margin: 0 0.5vw;
- }
- /* 1,1,1 */
- .log_commentary {
- color: rgb(0, 176, 80);
- }
- .log_company {
- color: rgb(255, 33, 0);
- }
- .log_content {
- width: fit-content;
- margin: 0.3vw 1.5vw 1vw 1.5vw;
- padding: 0.5vw 0vw;
- text-indent: 1.2em;
- line-height: 2.1vh;
- background-color: rgb(255, 255, 255);
- border-radius: 0.5vw;
- box-shadow: 0.19vw 0.16vw 0.4vw 0.03vw rgba(0, 0, 0, 0.13);
- }
- .log_content_color {
- /* background-color: rgb(250,250,250); */
- }
- .log_content_img img {
- /* width: 10%; */
- height: 150px;
- border-radius: 0.5vw;
- margin: 0.3vw 0;
- padding-right: 18px;
- padding-bottom: 7px;
- padding-left: 2px;
- }
- .log_item_top {
- height: 70%;
- overflow: scroll;
- }
- .log_item_top {
- height: 60vh;
- }
- .log_item_bottom {
- display: flex;
- /* height: 17vh; */
- /* border-top: 1px solid #eee; */
- margin: 0 1.5vw;
- /* background-color: rgb(250,250,250); */
- }
- .log_input input {
- width: 55vw;
- height: 10vh;
- border: #eee 1px solid;
- }
- .log_bottom_img {
- /* height: 5vh; */
- }
- .log_bottom_img img {
- height: 4vw;
- width: 6vw;
- border-radius: 0.5vw;
- margin: 0.5vw 0vw 0.5vw 0.3vw;
- }
- .log_bottom_left {
- width: 100%;
- margin-top: 1.5vh;
- }
- .log_bottom_right {
- width: 5%;
- }
- /* 上传图片 */
- .layui-upload-drag-self {
- background-color: #fbfdff;
- border: 1px dashed #c0ccda;
- border-radius: 6px;
- box-sizing: border-box;
- line-height: 4vw;
- vertical-align: top;
- display: inline-block;
- text-align: center;
- cursor: pointer;
- outline: 0;
- margin-right: 13px;
- float: left;
- }
- .layui-input-inlines-self {
- position: relative;
- margin-left: 90px;
- min-height: 36px;
- text-align: left;
- }
- .layui-upload-drag-self .layui-icon {
- font-size: 28px;
- color: #8c939d
- }
- .layui-upload-drag-self .img {
- position: relative;
- height: 148px;
- width: 148px;
- }
- .layui-upload-img {
- width: 148px;
- height: 148px;
- border-radius: 6px;
- margin-top: -3px;
- margin-left: -2px;
- }
- .handle {
- position: absolute;
- width: 148px;
- height: 100%;
- z-index: 100;
- border-radius: 6px;
- top: 0;
- background: rgba(59, 60, 61, 0.6);
- text-align: center;
- }
- .handle .icon-myself {
- z-index: 999;
- transition: all .3s;
- cursor: pointer;
- font-size: 25px;
- width: 25px;
- color: rgba(255, 255, 255, 0.91);
- margin: 0 4px;
- }
- .log_textarea {
- width: 89vw;
- height: 8vh;
- padding: 0.5vw;
- /* margin-right: 2vw; */
- margin: 1vw;
- }
- .log_button_img {
- width: 2vw;
- }
- .log_card {
- border: none !important;
- }
- /* 点击图片放大 */
- .content_img img {
- max-width: 100%;
- cursor: pointer;
- }
- .overlay {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.7);
- justify-content: center;
- z-index: 1;
- }
- .overlay img {
- margin-top: 4%;
- max-width: 90%;
- max-height: 90%;
- object-fit: contain;
- }
- .p-4 {
- background-color: rgb(255, 255, 255);
- }
- /*表格*/
- #tabniubi {
- width: 100%;
- margin: 10px 0;
- background-color: #fff;
- color: #5f5f5f;
- }
- #tabniubi th {
- padding: 9px 15px;
- min-height: 20px;
- height: 40px;
- line-height: 40px;
- text-align: center;
- /* font-size: 14px; */
- border-width: 1px;
- border-style: solid;
- border-color: #e2e2e2;
- font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
- }
- #tabniubi tr:first-child {
- padding: 0;
- min-height: 0;
- line-height: 0;
- border-width: 0;
- border-style: none;
- border-color: #fff;
- font-size: 0;
- }
- #tabniubi tr:first-child th {
- padding: 0;
- min-height: 0;
- line-height: 0;
- border-width: 0;
- border-style: none;
- border-color: #fff;
- font-size: 0;
- }
- .form-title {
- background-color: rgb(241, 241, 241);
- color: rgb(95, 95, 95);
- border-color: rgb(241, 241, 241);
- font-weight: 600;
- }
- .forleft {
- text-align: left !important;
- }
- /* .forright{
- text-align:right !important;
- } */
- .layui-form-select dl dd.layui-this {
- background-color: #f8f8f8;
- color: rgb(23, 145, 233);
- font-weight: 700;
- }
- .layui-input, .layui-textarea {
- /* padding-left: 3.75vw; */
- color: #5f5f5f;
- }
- .upimg {
- width: 250px;
- height: 250px;
- }
- .fujianimg img {
- height: 5.5vh;
- }
- .filelist{
- width: 100%;
- overflow: auto;
- justify-content:flex-start;
- align-content: space-between;
- flex-direction: column-reverse;
- flex-wrap: wrap;
- display: flex;
- }
- .filelist li{
- padding: 0.5vw 0.8vw 0.5vw 0.8vw;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: inline-block;
- border-right: 1px solid #e2e2e2;
- float: left;
- }
- .filelist p{
- margin: 3px 0 5px 0;
- width: 11vw;
- overflow: hidden;
- text-overflow: ellipsis;
- text-align: center;
- }
- #filesBox2 li{
- padding: 0.5vw 0.8vw 0.5vw 0.8vw;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: inline-block;
- border-right: 1px solid #e2e2e2;
- float: left;
- }
-
- #filesBox2 .layui-table-tool{
- display: none;
- }
-
- #filesBox2 .layui-table-view .layui-table{
- width: 100% !important;
- }
-
- #filesBox2 .layui-table-cell{
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .laytable-cell-1-0-1, .laytable-cell-1-0-2{
- justify-content: flex-start !important;
- }
-
- .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{
- display: flex;
- font: 14px red;
- font-weight: 600;
- color: #5f5f5f;
-
- }
- #tabniubi tr:first-child th{
- border-right: 1px solid #e2e2e2 !important;
- }
-
- #filesBox2 th:sixth-child{
- border-right: none !important;
- }
- </style>
- <form class="layui-form p-4" method="POST">
- <table id="tabniubi" cellpadding="1" cellspacing="1">
- <tr>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- <th style="width: 10%;height: 0;"></th>
- </tr>
- <tr border="1">
- <?php if($field['project_status'] == 1): ?>
- <th class="form-title">项目状态</th>
- <th>
- <?php switch($detail['project_status']): case "1": ?>立项中<?php break; case "2": ?>审批中<?php break; case "3": ?>待接收<?php break; case "4": ?>待分配<?php break; case "5": ?>作业中<?php break; case "6": ?>归档中<?php break; case "7": ?>退审中<?php break; case "8": ?>已归档<?php break; case "9": ?>已退审<?php break; default: ?>未知
- <?php endswitch; ?>
- </th>
- <?php endif; if($field['project_name'] == 1): ?>
- <th class="form-title">项目名称</th>
- <th colspan="3"><?php echo htmlentities($detail['project_name']); ?></th>
- <?php endif; if($field['project_num'] == 1): ?>
- <th class="form-title">项目编号</th>
- <th colspan="2"><?php echo htmlentities($detail['project_num']); ?></th>
- <?php endif; ?>
- </tr>
- <tr>
- <?php if($field['project_time'] == 1): ?>
- <th class="form-title">项目周期</th>
- <th colspan="8" style="text-align: left; padding-left: 3.5vw;"><?php echo htmlentities(date("Y-m-d",!is_numeric($detail['project_start_time'])? strtotime($detail['project_start_time']) : $detail['project_start_time'])); ?> 至
- <?php echo htmlentities(date("Y-m-d",!is_numeric($detail['project_end_time'])? strtotime($detail['project_end_time']) : $detail['project_end_time'])); ?>
- </th>
- <?php endif; ?>
- </tr>
- <tr>
- <?php if($field['engineering_type'] == 1): ?>
- <th class="form-title">项目类型</th>
- <th>
- <div>
- <select name="engineering_type1" lay-verify="required" lay-filter="aihao"
- <?php if($field_edit['engineering_type_edit'] != 1): ?>
- disabled
- <?php endif; ?>
- >
- <option value="1" <?php if($detail['engineering_type1'] == '1'): ?> selected <?php endif; ?>>预算</option>
- <option value="2" <?php if($detail['engineering_type1'] == '2'): ?> selected <?php endif; ?>>结算</option>
- <option value="3" <?php if($detail['engineering_type1'] == '3'): ?> selected <?php endif; ?>>概算</option>
- <option value="4" <?php if($detail['engineering_type1'] == '4'): ?> selected <?php endif; ?>>决算</option>
- <option value="5" <?php if($detail['engineering_type1'] == '5'): ?> selected <?php endif; ?>>工程总承包(EPC)</option>
- </select>
- </div>
- </th>
- <th class="form-title">——</th>
- <th>
- <div>
- <select name="engineering_type2" lay-verify="required" lay-filter="aihao"
- <?php if($field_edit['engineering_type_edit'] != 1): ?>
- disabled
- <?php endif; ?>
- >
- <option value="1" <?php if($detail['engineering_type2'] == '1'): ?> selected <?php endif; ?>>审核</option>
- <option value="2" <?php if($detail['engineering_type2'] == '2'): ?> selected <?php endif; ?>>编制</option>
- </select>
- </div>
- </th>
- <?php endif; if($field['engineering_category'] == 1): ?>
- <th class="form-title">工程类别</th>
- <th>
- <div>
- <select name="engineering_category" lay-filter="engineering_category"
- <?php if($field_edit['engineering_category_edit'] != 1): ?>
- disabled
- <?php endif; ?>>
- <option value="">请选择工程类别</option>
- <option value="建筑物" <?php if($detail['engineering_category'] == '建筑物'): ?> selected <?php endif; ?>>建筑物</option>
- <option value="交通" <?php if($detail['engineering_category'] == '交通'): ?> selected <?php endif; ?>>交通</option>
- <option value="水利" <?php if($detail['engineering_category'] == '水利'): ?> selected <?php endif; ?>>水利</option>
- <option value="土地整治" <?php if($detail['engineering_category'] == '土地整治'): ?> selected <?php endif; ?>>土地整治</option>
- <option value="市政园林" <?php if($detail['engineering_category'] == '市政园林'): ?> selected <?php endif; ?>>市政园林</option>
- <option value="信息网络" <?php if($detail['engineering_category'] == '信息网络'): ?> selected <?php endif; ?>>信息网络</option>
- <option value="其他" <?php if($detail['engineering_category'] == '其他'): ?> selected <?php endif; ?>>其他</option>
- </select>
- </div>
- </th>
- <?php endif; if($field['project_region'] == 1): ?>
- <th class="form-title">项目区域</th>
- <th colspan="2">
- <div>
- <div class="layui-form-item"
- style="margin-bottom: 0;display: flex;flex-direction: row;justify-content: space-between;">
- <div class="layui-input-inline" style="width: 6.5vw;">
- <select id="province" lay-filter="province" name="province"
- <?php if($field_edit['project_region_edit'] != 1): ?>
- disabled
- <?php endif; ?>
- ></select>
- </div>
- <div class="layui-input-inline area" style="width: 6.5vw;">
- <select id="city" lay-filter="city" name="city"
- <?php if($field_edit['project_region_edit'] != 1): ?>
- disabled
- <?php endif; ?>
- ></select>
- </div>
- <div class="layui-input-inline area" style="width: 6.5vw;">
- <select id="area" lay-filter="area" name="area"
- <?php if($field_edit['project_region_edit'] != 1): ?>
- disabled
- <?php endif; ?>
- ></select>
- </div>
- </div>
- </div>
- </th>
- <?php endif; ?>
- </tr>
- <tr>
- <?php if($field['fiscal_nature'] == 1): ?>
- <th class="form-title">资金性质</th>
- <th>
- <div>
- <select name="fiscal_nature" lay-filter="aihao"
- <?php if($field_edit['fiscal_nature_edit'] != 1): ?>
- disabled
- <?php endif; ?>
- >
- <option value="">请选择资金性质</option>
- <option value="财政资金" <?php if($detail['fiscal_nature'] == '财政资金'): ?> selected <?php endif; ?>>财政资金</option>
- <option value="非财政资金" <?php if($detail['fiscal_nature'] == '非财政资金'): ?> selected <?php endif; ?>>非财政资金</option>
- </select>
- </div>
- </th>
- <?php endif; if($field['project_scale'] == 1): ?>
- <th class="form-title">项目规模</th>
- <th colspan="3">
- <input type="text" name="project_scale" value="<?php echo htmlentities($detail['project_scale']); ?>" autocomplete="off"
- placeholder="请输入项目规模"
- <?php if($field_edit['project_scale_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; if($field['charge_standard'] == 1): ?>
- <th class="form-title">收费标准</th>
- <th colspan="2">
- <input type="text" name="charge_standard" value="<?php echo htmlentities($detail['charge_standard']); ?>" autocomplete="off"
- placeholder="请输入收费标准"
- <?php if($field_edit['charge_standard_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; ?>
- </tr>
- <?php if($field['entrust_unit'] == 1 || $field['entrust_head'] == 1 || $field['sent_review_unit'] == 1 || $field['sent_review_head'] == 1
- || $field['review_unit'] == 1 || $field['review_head'] == 1 || $field['operate_name'] == 1 || $field['operate_team_names'] == 1): ?>
- <tr>
- <th colspan="9" class="forleft">相关单位</th>
- </tr>
- <tr>
- <?php if($field['entrust_unit'] == 1): ?>
- <th class="form-title">委托单位</th>
- <th>
- <?php echo htmlentities($detail['entrust_unit_name']); ?>
- </th>
- <?php endif; if($field['entrust_head'] == 1): ?>
- <th class="form-title">负责人</th>
- <th>
- <?php echo htmlentities($detail['entrust_maker_name']); ?>
- </th>
- <?php endif; if($field['sent_review_unit'] == 1): ?>
- <th class="form-title">送审单位</th>
- <th>
- <?php echo htmlentities($detail['sent_review_unit_name']); ?>
- </th>
- <?php endif; if($field['sent_review_head'] == 1): ?>
- <th class="form-title">负责人</th>
- <th colspan="2">
- <?php echo htmlentities($detail['sent_review_head_name']); ?>
- </th>
- <?php endif; ?>
- </tr>
- <tr>
- <?php if($field['review_unit'] == 1): ?>
- <th class="form-title">评审机构</th>
- <th>
- <?php echo htmlentities($detail['review_unit_name']); ?>
- </th>
- <?php endif; if($field['review_head'] == 1): ?>
- <th class="form-title">项目负责人</th>
- <th>
- <?php echo htmlentities($detail['review_head_name']); ?>
- </th>
- <?php endif; if($field['operate_name'] == 1): ?>
- <th class="form-title">作业负责人</th>
- <th>
- <?php echo htmlentities($detail['operate_head_name']); ?>
- </th>
- <?php endif; if($field['operate_team_names'] == 1): ?>
- <th class="form-title">作业成员</th>
- <th colspan="2">
- <?php echo htmlentities($detail['operate_team_names']); ?>
- </th>
- <?php endif; ?>
- </tr>
- <?php endif; ?>
- <tr>
- <th colspan="9" class="forleft">金额详情</th>
- </tr>
- <tr>
- <?php if($field['sent_review_amount'] == 1): ?>
- <th class="form-title" colspan="1">送审金额(元)</th>
- <th colspan="2">
- <input type="text" id="sent_review_amount" name="sent_review_amount" onkeyup="Add()"
- value="<?php echo htmlentities($detail['sent_review_amount']); ?>" autocomplete="off" placeholder="请输入送审金额"
- <?php if($field_edit['sent_review_amount_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; if($field['review_add_reduce_amount'] == 1): ?>
- <th class="form-title" colspan="1">审增金额(元)</th>
- <th colspan="2">
- <input type="text" id="review_add_amount" name="review_add_amount" value="<?php echo htmlentities($detail['review_add_amount']); ?>" onkeyup="Add()"
- autocomplete="off" placeholder="请输入审增额"
- <?php if($field_edit['authorize_amount_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; if($field['review_add_reduce_amount'] == 1): ?>
- <th class="form-title" colspan="1">审减金额(元)</th>
- <th colspan="2">
- <input type="text" id="review_reduce_amount" name="review_reduce_amount" value="<?php echo htmlentities($detail['review_reduce_amount']); ?>" onkeyup="Add()"
- autocomplete="off" placeholder="请输入审减额"
- <?php if($field_edit['authorize_amount_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; ?>
- </tr>
- <tr>
- <?php if($field['authorize_amount'] == 1): ?>
- <th class="form-title" colspan="1">审定金额(元)</th>
- <th colspan="2" style="text-align: left;">
- <input type="text" id="authorize_amount" name="authorize_amount" value="<?php echo htmlentities($detail['authorize_amount']); ?>" onkeyup="Add()"
- autocomplete="off" placeholder="请输入审定金额"
- <?php if($field_edit['authorize_amount_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; if($field['review_add_reduce_rate'] == 1): ?>
- <th class="form-title" colspan="1">审增减率(%)</th>
- <th colspan="2">
- <span id="review_add_reduce_rate"><?php echo htmlentities($detail['review_add_reduce_rate']); ?></span>
- <input type="hidden" name="review_add_reduce_rate" value="<?php echo htmlentities($detail['review_add_reduce_rate']); ?>" autocomplete="off" placeholder="请输入审增减率" class="layui-input">
- </th>
- <?php endif; if($field['sent_review_cost'] == 1): ?>
- <th class="form-title" colspan="1">送审服务费 (元)</th>
- <th colspan="2" style="text-align: left;">
- <input type="text" name="sent_review_cost" value="<?php echo htmlentities($detail['sent_review_cost']); ?>" autocomplete="off" placeholder="请输入送审服务费"
- <?php if($field_edit['sent_review_cost_edit'] != 1): ?>
- readonly
- <?php endif; ?>
- class="layui-input">
- </th>
- <?php endif; ?>
- </tr>
- <!-- <tr>
- <th class="form-title" colspan="1">报告时间</th>
- <th colspan="8" style="text-align: left;"><?php echo htmlentities($detail['report_time']); ?></th>
- </tr>-->
- <tr>
- <th colspan="9" class="forleft">相关附件
- <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-on="test-iframe-handle" style="float: right;">
- 上传附件
- <span id="ID-test-iframe-mark"></span>
- </button>
- </th>
- </tr>
- <tr>
- <th colspan="9" class="fujianimg" style="padding: 0px 0px;">
- <div id="filesBox2">
- <table class="layui-hide" id="get_file" lay-filter="get_file"></table>
- </div>
- </th>
- </tr>
- </table>
- <div class="py-3">
- <input type="hidden" name="id" value="<?php echo htmlentities($detail['id']); ?>"/>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="save">保存</button>
- </div>
- </form>
- <script>
- //审定金额=送审金额+审增金额+审减金额
- //(审定金额-送审金额)/送审金额*100%
- function Add(){
- var input1 = 0,input2 = 0,input3 = 0,input4 = 0;
- input1 = Number(document.getElementById("sent_review_amount").value).toFixed(2);
- input2 = Number(document.getElementById("authorize_amount").value).toFixed(2);
- // input3 = Number(document.getElementById("review_add_amount").value).toFixed(2);
- // input4 = Number(document.getElementById("review_reduce_amount").value).toFixed(2);
-
- if (input1!=="0.00" && input2!=="0.00") {
- var aa= (input2-input1).toFixed(2);
- var bb = aa/input1*100;
- bb = bb.toFixed(2);
- $('[name="review_add_reduce_rate"]').val(bb);
- $('#review_add_reduce_rate').html(bb)
- }else {
- $('[name="review_add_reduce_rate"]').val('0.00');
- $('#review_add_reduce_rate').html('0.00')
- }
- // 总审定金额-总送审金额
- }
- function first() {
- var form = layui.form, tool = layui.tool, oaTool = layui.oaTool;
- let table = layui.table;
- //附件表格
- var allcount;
- parent.layui.get_fileTable = table.render({
- elem: '#get_file',
- title: '文档列表',
- toolbar: '#toolbarget_file',
- cellMinWidth: 80,
- parseData: function (res) { // 数据解析回调函数
- // 在这里可以获取数据总数
- allcount = res.data.length;
- return {
- code: res.code, // 数据状态码
- msg: res.msg, // 状态信息
- count: res.count, // 数据总数
- data: res.data // 当前页数据
- };
- },
- // className: 'layui-table-testcss', // 用于给表格主容器追加 css 类名
- // lineStyle: 'height: 151px;', // 定义表格的多行样式
- url: "/admin/project.api/get_file",
- where: {'id': project_id},
- page: true, //开启分页
- limit: 20,
- cols: [[
- {field: 'id', title: '序号', width: 80, align: 'center',
- templet: function (d) {
- console.log(allcount,d.LAY_NUM)
- return allcount - (d.LAY_NUM - 1);
-
- }
- },
- {field: 'name', title: '附件名称', align: 'left',
- },
- {field: 'remark', title: '附件说明', align: 'left',
- },
- {field: 'admin_name', title: '上传人', align: 'center', width: 150},
- {field: 'create_time', title: '上传时间', align: 'center', width: 150,
- templet:"<div>{{layui.util.toDateString(d.create_time*1000, 'yyyy-MM-dd HH:mm:ss')}}</div>"},
- {field: 'right', fixed: 'right', title: '操作', width: 150, align: 'center',
- templet: function (d) {
- var html = '<div class="layui-btn-group">';
- var btn1 = `<a href="https://view.officeapps.live.com/op/view.aspx?src=${d.filepath}" target="_blank" class="layui-btn layui-btn-xs">预览</a>`;
- var btn2 = `<a class="layui-btn layui-btn-xs layui-bg-blue" href="${d.filepath}" download="${d.name}" lay-event="">下载</a>`;
- var btn3 = `<span data-id="${d.id}" class="layui-btn layui-btn-xs layui-btn-danger file-del ">删除</span>`;
- return html + btn1 + btn2 + btn3 +'</div>';
- }
- }
- ]]
- });
-
-
- //上传附件弹出窗
- layui.use(function(){
- var $ = layui.$;
- var layer = layui.layer;
- var upload = layui.upload;
- var util = layui.util;
-
- // 事件
- util.on('lay-on', {
- 'test-iframe-handle': function(){
- layer.open({
- type: 2,
- area: ['680px', '520px'],
- content: 'ceshi?id=<?php echo htmlentities($detail['id']); ?>',
- fixed: false, // 不固定
- maxmin: true,
- shadeClose: true,
- title: '上传附件',
- btnAlign: 'c',
- yes: function(index, layero){
- // 获取 iframe 的窗口对象
- var iframeWin = window[layero.find('iframe')[0]['name']];
- var elemMark = iframeWin.$('#mark'); // 获得 iframe 中某个输入框元素
- var value = elemMark.val();
-
-
-
- if($.trim(value) === '') return elemMark.focus();
- // 显示获得的值
- layer.msg('获得 iframe 中的输入框标记值:'+ value);
- }
- });
- },
- })
- });
-
-
- let adress;
- //日期选择
- layui.laydate.render({
- elem: '#date',
- range: ['#start_time', '#end_time'],
- rangeLinked: true
- });
- let c = 1;
- //监听提交
- form.on('submit(save)', function (data) {
- if(c){
- let callback = function (e) {
- c = 1
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- }
- }
- var engineering_type1 ='';
- if(data.field.engineering_type1==1){
- engineering_type1 ='预算';
- }else if(data.field.engineering_type1==2){
- engineering_type1 ='结算';
- }else if(data.field.engineering_type1==3){
- engineering_type1 ='概算';
- }else if(data.field.engineering_type1==4){
- engineering_type1 ='决算';
- }else if(data.field.engineering_type1==5){
- engineering_type1 ='工程总承包(EPC)';
- }
-
- var engineering_type2 = '';
- if(data.field.engineering_type2==1){
- engineering_type2 ='审核';
- }else if(data.field.engineering_type2==2) {
- engineering_type2 = '编制';
- }
- if(engineering_type1!==""&&engineering_type2!==""){
- data.field.engineering_type = engineering_type1 + "-" + engineering_type2;
- }
- tool.post("/admin/project.cost_company/edit", data.field, callback);
- }
- c = 0
- return false;
- });
- oaTool.addFile({
- type: 1,
- isSave: true,
- ajaxSave: function (res) {
- let callback = function (e) {
- if(e.code == 202){
- layer.msg(e.msg);
- }else{
- layer.msg('上传成功!');
- }
- setTimeout(function () {
- $("#filesBox2").load(location.href+" #filesBox>*","type=2")
- }, 500)
- }
- // console.log(res,"<?php echo htmlentities($detail['id']); ?>")
- tool.post("/admin/project.api/add_file_company", {
- 'topic_id': "<?php echo htmlentities($detail['id']); ?>",
- 'file_id': res.data.id,
- 'file_name': res.data.name,
- 'module': 'project'
- }, callback);
- }
- });
- $('#filesBox2').on('click', '.file-del', function () {
- let id = $(this).parent().parent().data('id');
- layer.confirm('确定要删除该文件吗?请慎重', {icon: 3, title: '提示'}, function (index) {
- let callback = function (e) {
- $("#" + id + "").remove();
- layer.closeAll();
- layer.msg(e.msg);
- $('[lay-filter="webform"]').click();
- }
- tool.delete("/admin/project.api/delete_file_company", {id: id}, callback);
- });
- })
- layui.use(['form', 'jquery'], function () {
- var form = layui.form;
- const $ = layui.jquery;
- let adress;
- $.ajax({
- type: "get", //使用get方式
- url: "/static/assets/layui/adress.json", //json文件相对于这个HTML的路径
- dataType: "json",
- async: false,
- success: function (data) {
- //这个data就是json数据
- adress = data
- var province = Object.keys(adress)
- var proStrs = '<option value="">省</option>';
- for (var i = 0; i < province.length; i++) {
- proStrs += '<option value="' + province[i] + '">' + province[i] + '</option>';
- }
- $("#province").html(proStrs);
- layui.form.render("select")
- },
- error: function () {
- layer.alert("地址请求失败!! ");
- }
- });
- function getFirstAttr(obj) {
- for (var k in obj) return k;
- }
- function selectOption(selectedProvince, selectedCity = '', selectedArea = '') {
- var proStr = '<option value="">省</option>', cityStr = '<option value="">市</option>',
- areaStr = '<option value="">县</option>';
- var pro = adress[selectedProvince], ci = adress[selectedProvince][selectedCity];
- for (var province in adress) {
- if (province == selectedProvince) proStr += '<option value="' + province + '" selected>' + province + '</option>';
- else proStr += '<option value="' + province + '">' + province + '</option>';
- }
- $("#province").html(proStr);
- for (var city in pro) {
- if (city == selectedCity) cityStr += '<option value="' + city + '" selected>' + city + '</option>';
- else cityStr += '<option value="' + city + '">' + city + '</option>';
- }
- $("#city").html(cityStr);
- for (var area in ci) {
- if (area == "remove") {
- continue;
- }
- if (ci[area] == selectedArea) areaStr += '<option value="' + ci[area] + '" selected>' + ci[area] + '</option>';
- else areaStr += '<option value="' + ci[area] + '">' + ci[area] + '</option>';
- }
- $("#area").html(areaStr);
- form.render();
- }
- /*selectOption(1,2, 3);*/
- form.on('select(province)', function (data) {
- let thisProvince = data.value;
- let thisCity = getFirstAttr(adress[thisProvince]);
- selectOption(data.value);
- });
- form.on('select(city)', function (data) {
- selectOption($("#province").val(), data.value, getFirstAttr(data.value));
- });
- selectOption("<?php echo htmlentities($detail['province']); ?>","<?php echo htmlentities($detail['city']); ?>","<?php echo htmlentities($detail['area']); ?>")
- })
- }
- </script>
- <script>
- // 获取具有指定 ID 的 <ul> 元素
- var ulElement = document.getElementById("filesBox");
- // 检查 <ul> 元素的子元素数量
- if (ulElement.children.length === 0) {
- // 如果子元素数量为 0,隐藏 <ul> 元素
- ulElement.style.display = "none";
- }
- </script>
- </div>
-
- <?php if($project_five['project_user'] == 1): ?>
- <div class="layui-tab-item">
- <div class="p-3 bg-white">
- <table class="layui-hide" id="user" lay-filter="user"></table>
- </div>
- <script type="text/html" id="toolbaruser">
- <div class="layui-btn-container">
- <?php if($detail['maker_type']==2): ?><button class="layui-btn layui-btn-sm" lay-event="addEntrust">+ 新增委托单位成员</button><?php endif; ?>
- <button class="layui-btn layui-btn-sm" lay-event="add_head">+ 新增项目负责人</button>
- <button class="layui-btn layui-btn-sm" lay-event="add">+ 新增作业负责人</button>
- <button class="layui-btn layui-btn-sm picker-more" lay-event="adda">+ 新增作业成员</button>
- <button class="layui-btn layui-btn-sm picker-more" lay-event="adc">+ 新增送审单位成员</button>
- </div>
- </script>
- <script>
- function project_user() {
- let tool = layui.tool, table = layui.table, employeepicker = layui.employeepicker;
- //项目成员
- parent.layui.userTable = table.render({
- elem: '#user',
- title: '项目成员列表',
- cellMinWidth: 80,
- toolbar: '#toolbaruser',
- url: "/admin/project.cost_company/project_user", //数据接口
- where: {'project_id': project_id},
- page: false, //开启分页
- limit: 20,
- cols: [[ //表头
- {field: 'nickname', fixed: 'left', title: '成员姓名', width: 200, align: 'center', rowspan: 2},
- {field: 'unit_name', title: '所在单位', align: 'center', width: 200, rowspan: 2},
- {
- field: 'type', title: '成员类型', align: 'center', width: 200, rowspan: 2,
- templet: function (a) {
- var html = "";
- if (a.type == 1) {
- html = "项目负责人"
- } else if (a.type == 2) {
- html = "项目负责人"
- } else if (a.type == 3) {
- html = "作业负责人"
- } else if (a.type == 4) {
- html = "作业成员"
- } else if (a.type == 5) {
- html = "项目负责人"
- } else if (a.type == 6) {
- html = "项目负责人"
- }
- return html;
- }
- },
- {field: 'unit_type', title: '单位类型', align: 'center', width: 200, rowspan: 2},
- {field: 'mobile', title: '手机号码', align: 'center', rowspan: 2},
- {field: 'email', title: '单位邮箱', align: 'center', rowspan: 2},
- {
- title: '操作', fixed: 'right', align: 'center', width: 150, rowspan: 2, templet: function (d) {
- var html = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</span>';
- return html;
- }
- }
- ]]
- });
- //触发事件
- table.on('toolbar(user)', function (obj) {
- var checkStatus = table.checkStatus(obj.config.id);
- switch (obj.event) {
- case 'addEntrust':
- // let callback = function (){
- // layui.alert("hhh")
- // }
- aaa()
- break;
- case 'add':
- employeepicker.init({
- type: 0,
- department_url: "/admin/project.cost_company/get_department_tree",
- employee_url: "/admin/project.cost_company/get_employee",
- callback: function (ids, names, dids, departments) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- parent.layui.userTable.reload();
- }
- }
- tool.post("/admin/project.cost_company/add_user_company_type1", {
- id: ids,
- project_id: project_id,
- type: 1
- }, callback);
- }
- })
- break;
- case "adda":
- employeepicker.init({
- type: 0,
- department_url: "/admin/project.cost_company/get_department_tree",
- employee_url: "/admin/project.cost_company/get_employee",
- callback: function (ids, names, dids, departments) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- parent.layui.userTable.reload();
- }
- }
- tool.post("/admin/project.cost_company/add_user_company_type2", {
- id: ids,
- project_id: project_id,
- type: 2
- }, callback);
- }
- })
- break;
- case "adc":
- // getSentReview()
- let call = function () {
- layer.msg(e.msg);
- if (e.code == 0) {
- parent.layui.userTable.reload();
- }
- }
- // employeepicker.init({
- // type: 0,
- // department_url: "/admin/project.cost_company/get_department_tree",
- // employee_url: "/admin/project.cost_company/get_employee",
- // callback: function (ids, names, dids, departments) {
- // let callback = function (e) {
- // layer.msg(e.msg);
- // if (e.code == 0) {
- // parent.layui.userTable.reload();
- // }
- // }
- // tool.post("/admin/project.cost_company/add_sent_review_unit", {
- // id: ids,
- // project_id: project_id,
- // }, callback);
- // }
- // })
- parent.layui.tool.side('/admin/project.cost_company/add_sent_review_unit?project_id=' + project_id, call);
- break;
- case "add_head":
- employeepicker.init({
- type: 0,
- department_url: "/admin/project.cost_company/get_department_tree",
- employee_url: "/admin/project.cost_company/get_employee",
- callback: function (ids, names, dids, departments) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- parent.layui.userTable.reload();
- }
- }
- tool.post("/admin/project.cost_company/add_user_company_head", {
- id: ids,
- project_id: project_id,
- }, callback);
- }
- })
- break;
- }
- });
- //监听行工具事件
- table.on('tool(user)', function (obj) {
- let postData = {"id": obj.data.id, "project_id": project_id, "type": obj.data.type};
- let callback = function (e) {
- layer.closeAll();
- layer.msg(e.msg);
- if (e.code == 0) {
- parent.layui.userTable.reload();
- }
- }
- if (obj.event === 'remove') {
- if (obj.data.type == 3 || obj.data.type == 4) {
- console.log(postData);
- layer.confirm('确定要移除该项目成员吗?', {icon: 3, title: '提示'}, function (index) {
- tool.delete("/admin/project.cost_company/remove_user_company", postData, callback);
- });
- } else if (obj.data.type == 6) {
- layer.confirm('确定要移除该送审单位成员吗?', {icon: 3, title: '提示'}, function (index) {
- tool.delete("/admin/project.cost_company/remove_sent_review", {
- "id": obj.data.id,
- "project_id": project_id,
- "type": obj.data.type,
- "nickname": obj.data.nickname
- }, callback);
- });
- } else if (obj.data.type == 2) {
- layer.confirm('确定要移除该送审单位成员吗?', {icon: 3, title: '提示'}, function (index) {
- tool.delete("/admin/project.cost_company/remove_review_head", postData, callback);
- });
- } else if (obj.data.type == 1) {
- layer.confirm('确定要移除该委托单位成员吗?', {icon: 3, title: '提示'}, function (index) {
- tool.delete("/admin/project.cost_company/remove_entrust_head", postData, callback);
- });
- }else {
- layer.msg("该成员不可移除");
- }
- }
- return;
- });
- //委托单位
- function aaa(callback){
- var customeTable,form = layui.form;
- const a = layer.open({
- title: '选择委托单位',
- area: ['600px', '580px'],
- type: 1,
- content: '<div class="picker-table">\
- <form class="layui-form pb-2">\
- <div class="layui-input-inline" style="width:480px;">\
- <input type="text" name="keywords" placeholder="委托单位" class="layui-input" autocomplete="off" />\
- </div>\
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="search_customer">提交搜索</button>\
- </form>\
- <div id="customerTable"></div></div>',
- success: function () {
- customeTable = table.render({
- elem: '#customerTable'
- , url: '/admin/project.api/get_entrust'
- , page: true //开启分页
- , limit: 10
- , cols: [[
- {type: 'radio', title: '选择'},
-
- {field: 'title', title: '委托单位名称', align: 'center'},
- {field: 'address', title: ' 评审单位地址', align: 'center'}
- ]]
- });
- //客户搜索提交
- form.on('submit(search_customer)', function (data) {
- customeTable.reload({where: {keywords: data.field.keywords}, page: {curr: 1}});
- return false;
- });
- },
- btn: ['确定'],
- btnAlign: 'c',
- yes: function () {
- var checkStatus = table.checkStatus(customeTable.config.id);
- var data = checkStatus.data;
- console.log(data)
- if (data.length > 0) {
- bbb(data);
- layer.close(a);
- } else {
- layer.msg('请先选择委托单位');
- return false;
- }
- }
- })
- }
- function bbb(e){
- var entrustPeopleTable,form = layui.form;
- layer.open({
- title: '选择委托单位',
- area: ['600px', '580px'],
- type: 1,
- content: '<div class="picker-table">\
- <form class="layui-form pb-2">\
- <div class="layui-input-inline" style="width:480px;">\
- <input type="text" name="keywords" placeholder="委托单位" class="layui-input" autocomplete="off" />\
- </div>\
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="entrustPeople">提交搜索</button>\
- </form>\
- <div id="entrustPeopleTable"></div></div>',
- success: function () {
- entrustPeopleTable = table.render({
- elem: '#entrustPeopleTable'
- , url: '/admin/project.api/get_entrust_people'
- , where:{unit_id:e[0]["id"]}
- , page: true //开启分页
- , limit: 10
- , cols: [[
- {type: 'radio', title: '选择'},
- {field: 'id', width: 80, title: '编号', align: 'center'},
- {field: 'nickname', title: '昵称', align: 'center'},
- ]]
- });
- //客户搜索提交
- form.on('submit(entrustPeople)', function (data) {
- entrustPeopleTable.reload({where: {keywords: data.field.keywords,unit_id:e[0]["id"]}, page: {curr: 1}});
- return false;
- });
- },
- btn: ['确定'],
- btnAlign: 'c',
- yes: function () {
- var checkStatus = table.checkStatus(entrustPeopleTable.config.id);
- var data = checkStatus.data;
- console.log(data)
- if (data.length > 0) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- layer.closeAll();
- parent.layui.userTable.reload();
- }
- }
- tool.post("/admin/project.cost_company/add_entrust_people", {
- id: data[0]["id"],
- project_id: project_id,
- }, callback);
- } else {
- layer.msg('请先选择委托单位人员');
- return false;
- }
- }
- })
- }
- function getSentReview(){
- var sentReviewTable,form = layui.form;
- const a = layer.open({
- title: '选择送审单位',
- area: ['600px', '580px'],
- type: 1,
- content: '<div class="picker-table">\
- <form class="layui-form pb-2">\
- <div class="layui-input-inline" style="width:480px;">\
- <input type="text" name="keywords" placeholder="委托单位" class="layui-input" autocomplete="off" />\
- </div>\
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="search_customer">提交搜索</button>\
- </form>\
- <div id="sentReviewTable"></div></div>',
- success: function () {
- sentReviewTable = table.render({
- elem: '#sentReviewTable'
- , url: '/admin/project.api/get_sent_review'
- , page: true //开启分页
- , limit: 10
- , cols: [[
- {type: 'radio', title: '选择'},
- {field: 'id', width: 80, title: '编号', align: 'center'},
- {field: 'title', title: '送审单位名称', align: 'center'},
- {field: 'address', title: ' 送审单位地址', align: 'center'}
- ]]
- });
- //客户搜索提交
- form.on('submit(search_customer)', function (data) {
- sentReviewTable.reload({where: {keywords: data.field.keywords}, page: {curr: 1}});
- return false;
- });
- },
- btn: ['确定'],
- btnAlign: 'c',
- yes: function () {
- var checkStatus = table.checkStatus(sentReviewTable.config.id);
- var data = checkStatus.data;
- console.log(data)
- if (data.length > 0) {
- getSentReviewPeople(data);
- layer.close(a);
- } else {
- layer.msg('请先选择送审单位');
- return false;
- }
- }
- })
- }
- function getSentReviewPeople(e){
- var sentReviewPeople,form = layui.form;
- layer.open({
- title: '选择送审单位',
- area: ['600px', '580px'],
- type: 1,
- content: '<div class="picker-table">\
- <form class="layui-form pb-2">\
- <div class="layui-input-inline" style="width:480px;">\
- <input type="text" name="keywords" placeholder="委托单位" class="layui-input" autocomplete="off" />\
- </div>\
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="entrustPeople">提交搜索</button>\
- </form>\
- <div id="sentReviewPeople"></div></div>',
- success: function () {
- sentReviewPeople = table.render({
- elem: '#sentReviewPeople'
- , url: '/admin/project.api/get_sent_review_people'
- , where:{unit_id:e[0]["id"]}
- , page: true //开启分页
- , limit: 10
- , cols: [[
- {type: 'radio', title: '选择'},
- {field: 'id', width: 80, title: '编号', align: 'center'},
- {field: 'nickname', title: '昵称', align: 'center'},
- ]]
- });
- //客户搜索提交
- form.on('submit(entrustPeople)', function (data) {
- sentReviewPeople.reload({where: {keywords: data.field.keywords,unit_id:e[0]["id"]}, page: {curr: 1}});
- return false;
- });
- },
- btn: ['确定'],
- btnAlign: 'c',
- yes: function () {
- var checkStatus = table.checkStatus(sentReviewPeople.config.id);
- var data = checkStatus.data;
- console.log(data)
- if (data.length > 0) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- layer.closeAll();
- parent.layui.userTable.reload();
- }
- }
- tool.post("/admin/project.cost_company/add_sent_review_unit", {
- id: data[0]["id"],
- project_id: project_id,
- }, callback);
- } else {
- layer.msg('请先选择送审单位人员');
- return false;
- }
- }
- })
- }
- }
- </script>
- </div>
- <?php endif; if($project_five['project_report'] == 1): ?>
- <div class="layui-tab-item">
- <div class="p-3 bg-white">
- <table class="layui-hide" id="report" lay-filter="report"></table>
- </div>
- <script type="text/html" id="toolbarreport">
- <div class="layui-btn-container">
- <button class="layui-btn layui-btn-sm" lay-event="add">+ 新建报告</button>
- </div>
- </script>
- <script>
- function report() {
- let tool = layui.tool, table = layui.table;
- //项目任务
- var allcount;
- parent.layui.reportTable = table.render({
- elem: '#report',
- title: '文档列表',
- toolbar: '#toolbarreport',
- cellMinWidth: 80,
- parseData: function (res) { // 数据解析回调函数
- // 在这里可以获取数据总数
- allcount = res.data.length;
- return {
- code: res.code, // 数据状态码
- msg: res.msg, // 状态信息
- count: res.count, // 数据总数
- data: res.data // 当前页数据
- };
- },
- url: "/admin/project.report/datalist_company",
- where: {'project_id': project_id},
- page: true, //开启分页
- limit: 20,
- cols: [[
- {field: 'id', title: '序号', width: 110, align: 'center',
- templet: function (d) {
- console.log(allcount,d.LAY_NUM)
- return allcount - (d.LAY_NUM - 1);
-
- }
- },
- {field: 'title', title: '报告名称',align: 'center',
- templet: function (d) {
- var html = "";
- if(d.status == 4||d.status == 7){
- html = '<a class="side-a" lay-event="detail" style="color: grey;text-decoration:line-through" lay-event="detail">' + d.title + '</a>';
- }else{
- html = '<a class="side-a" lay-event="detail" lay-event="detail">' + d.title + '</a>';
- }
- return '<div style="text-align:left">' + html + '</div>'
- }
- },
- {field: 'type', title: '报告类型', align: 'center', width: 100,templet:function (item){
- var html = '';
- if(item.type === 0){
- html = "<span>初审报告</span>";
- }else if(item.type === 1){
- html = "<span>对数报告</span>";
- }else if(item.type === 2){
- html = "<span>审定报告</span>";
- }
- return html;
- }},
- {field: 'status', title: '审批状态', align: 'center', width: 150,
- templet:function (d){
- var abc = '';
- if(d.status==0){
- abc = "<span>未审核(新建)</span>";
- }else if(d.status==1){
- abc = "<span>已通过(新建)</span>";
- }else if(d.status==2){
- abc = "<span>已拒绝(新建)</span>";
- }else if(d.status==3){
- abc = "<span>未审核(删除)</span>";
- }else if(d.status==4){
- abc = "<span>已通过(删除)</span>";
- }else if(d.status==5){
- abc = "<span>已拒绝(删除)</span>";
- }else if(d.status==6){
- abc = "<span>未审核(内部)</span>";
- }else if(d.status==7){
- abc = "<span>已拒绝(内部)</span>";
- }
- return abc;
- }
- },
- {field: 'create_time', title: '创建时间', align: 'center', width: 150},
- {field: 'admin_name', title: '创建人', align: 'center', width: 100},
- {field: 'right', fixed: 'right', title: '操作', width: 150, align: 'center',
- templet: function (d) {
- var html = '<div class="layui-btn-group">';
- var btn3 = `<a class="layui-btn layui-btn-xs" lay-event="progress">进度</a>`;
- var btn1 = `<a class="layui-btn layui-btn-xs" href=${d.filepath} download=${d.name} lay-event="">下载</a>`;
- var btn2 = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</span>';
- return html + btn3 +btn1 + btn2 + '</div>';
- }
- }
- ]]
- });
- //触发事件
- table.on('toolbar(report)', function (obj) {
- var checkStatus = table.checkStatus(obj.config.id);
- switch (obj.event) {
- case 'add':
- parent.layui.tool.side('/admin/project.report/add_company?project_id=' + project_id); // 项目id
- break;
- }
- });
- table.on('tool(report)', function (obj) {
- var data = obj.data; //获得当前行数据
- if (obj.event === 'detail') { //查看
- let url = '/admin/project.report/view_company?id=' + data.id;// 项目id
- parent.layui.tool.side(url);
- }
- if (obj.event === 'del') {
- if(data.status==7){
- layer.msg("已拒绝,请重新创建");
- }else if(data.status==1 ){
- layer.prompt({title: '请输入<span style="color: red">删除</span>原因', formType: 2,area: ['35vw', '15vw']}, function(text, index){
- let callback = function (e) {
- parent.layui.reportTable.reload()
- layer.msg(e.msg);
- setTimeout(function (){
- layer.close(index);
- },2000)
- }
- tool.post("/admin/project.report/delete_company", {id: data.id ,project_id:data.project_id,remark:text}, callback);// 项目id
- });
-
- }else {
- layer.msg("不可操作");
- }
- }
-
- if (obj.event === 'progress') { //查看
- let url = '/admin/project.report/progress?id=' + data.id;
- parent.layui.tool.side(url);
- }
- })
- }
- </script>
- </div>
- <?php endif; if($project_five['project_contact'] == 1): ?>
- <div class="layui-tab-item">
- <div class="p-3 bg-white">
- <table class="layui-hide" id="contact" lay-filter="contact"></table>
- </div>
- <script type="text/html" id="toolbarcontact">
- <div class="layui-btn-container">
- <button class="layui-btn layui-btn-sm" lay-event="add">+ 新增联系函</button>
- </div>
- </script>
- <script>
- function contact() {
- let tool = layui.tool, table = layui.table;
- //项目任务
- var allcount;
- parent.layui.contactTable = table.render({
- elem: '#contact',
- title: '文档列表',
- toolbar: '#toolbarcontact',
- cellMinWidth: 80,
- parseData: function (res) { // 数据解析回调函数
- // 在这里可以获取数据总数
- allcount = res.data.length;
- return {
- code: res.code, // 数据状态码
- msg: res.msg, // 状态信息
- count: res.count, // 数据总数
- data: res.data // 当前页数据
- };
- },
- url: "/admin/project.contact/conlist_company",
- where: {'project_id': project_id},
- page: true, //开启分页
- limit: 20,
- cols: [[
- {field: 'id', title: '序号', width: 80, align: 'center',
- templet: function (d) {
- console.log(allcount,d.LAY_NUM)
- return allcount - (d.LAY_NUM - 1);
-
- }
- },
- {field: 'title', title: '联系函名称',align: 'center',
- templet: function (d) {
- var html = "";
- if(d.status == 5){
- html = '<a class="side-a" lay-event="detail" style="color: grey;text-decoration:line-through" lay-event="detail">' + d.title + '</a>';
- }else{
- html = '<a class="side-a" lay-event="detail" lay-event="detail">' + d.title + '</a>';
- }
- return '<div style="text-align:left">' + html + '</div>'
- }
- },
- {
- field: 'status',
- title: '审批状态',
- align: 'center',
- width: 150,
- templet:function (d){
- var abc = '';
- if(d.status==0){
- abc = "<span>未审核(新建)</span>";
- }else if(d.status==1){
- abc = "<span>已通过(新建)</span>";
- }else if(d.status==2){
- abc = "<span>已拒绝(新建)</span>";
- }else if(d.status==3){
- abc = "<span>未审核(删除)</span>";
- }else if(d.status==4){
- abc = "<span>已通过(删除)</span>";
- }else if(d.status==5){
- abc = "<span>已拒绝(删除)</span>";
- } else if (d.status == 8) {
- abc = "<span>回复</span>";
- }
- return abc;
- }
-
- },
- {field: 'create_time', title: '创建时间', align: 'center', width: 150},
- {field: 'admin_name', title: '创建人', align: 'center', width: 100},
- {field: 'approver', title: '审批人', align: 'center', width: 100},
- {field: 'right', fixed: 'right', title: '操作', width: 100, align: 'center',
- templet: function (d) {
- var html = '<div class="layui-btn-group">';
- var btn1 = `<a class="layui-btn layui-btn-xs" href=${d.filepath} download=${d.name} lay-event="">下载</a>`;
- var btn2 = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</span>';
- return html + btn1 + btn2 + '</div>';
- }
- }
- ]]
- });
- //触发事件
- table.on('toolbar(contact)', function (obj) {
- var checkStatus = table.checkStatus(obj.config.id);
- switch (obj.event) {
- case 'add':
- let callback = function (e) {
- window.location.reload()
- layer.msg(e.msg);
- setTimeout(function (){
- layer.close(index);
- },2000)
- }
- parent.layui.tool.side('/admin/project.contact/add_company?project_id=' + project_id,callback); // 项目id
- break;
- }
- });
- table.on('tool(contact)', function (obj) {
- var data = obj.data; //获得当前行数据
- console.log(data.status);
- if (obj.event === 'detail') { //查看
- let url = '/admin/project.contact/view_company?id=' + data.id;// 项目id
- parent.layui.tool.side(url);
- }
- if (obj.event === 'del') {
-
- if(data.status==1){
-
- layer.prompt({title: '请输入<span style="color: red">删除</span>原因', formType: 2,area: ['35vw', '15vw']}, function(text, index){
- let callback = function (e) {
- parent.layui.contactTable.reload()
- layer.msg(e.msg);
- setTimeout(function (){
- layer.close(index);
- },2000)
- }
- tool.post("/admin/project.contact/delete_company", {id: data.id ,project_id:data.project_id,remark:text}, callback);// 项目id
- });
- }else {
- layer.msg("不可操作");
- }
- }
- })
- }
- </script>
- </div>
- <?php endif; if($project_five['project_comments'] == 1): ?>
- <div class="layui-tab-item">
-
- <style>
- #imgdel {
- font-size: 30px;
- position: absolute;
- top: -30px;
- right: -12px;
- display: none;
- color: red;
- }
- .wrapper{
- display: flex;
- justify-content: space-between;
- padding-top: 3px;
- }
- </style>
- <div class="log_item_top" id="comments">
- <div class="layui-tab-content">
- <?php if(is_array($comment) || $comment instanceof \think\Collection || $comment instanceof \think\Paginator): $i = 0; $__LIST__ = $comment;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
- <div class="log_top">
- <span><?php echo htmlentities($vo['maker']); ?></span><span
- class="<?php if($vo['unit_type']==2): ?>log_commentary<?php else: ?>log_company<?php endif; ?>"><?php echo htmlentities($vo['unit_name']); ?></span><span><?php echo htmlentities(date("y-m-d H:i",!is_numeric($vo['create_time'])? strtotime($vo['create_time']) : $vo['create_time'])); ?></span>
- </div>
- <div class="log_content">
- <div style="word-wrap:break-word;padding: 5px 10px;width: fit-content;">
- <?php echo htmlentities($vo['content']); ?>
- </div>
- <?php if(!empty($vo['thumb'])): ?>
- <div class="log_content_img" style="width: fit-content;">
- <img src="<?php echo htmlentities($vo['thumb']); ?>" alt="" class="img-responsive">
- <span></span>
- </div>
- <?php endif; ?>
- </div>
- <?php endforeach; endif; else: echo "" ;endif; ?>
- </div>
- </div>
- <div class="log_item_bottom" style="border-top: 2px solid #e2e2e2;">
- <div class="layui-form log_bottom_left">
- <form class="layui-form" action="">
- <div class="layui-form-item layui-form-text" style="float: left;width: 95%;">
- <label class="layui-form-label">普通文本域</label>
- <div class="layui-input-block" style="margin-left: 100px;">
- <textarea id="text" name="content" placeholder="请输入内容" class="layui-textarea" maxlength="3000" onkeyup="setLength(this,3000,'wordsLength');"></textarea>
- </div>
- <div class="wrapper">
- <span></span><span class="total">0/3000字</span>
- </div>
- </div>
- <div class="layui-form-item" style="float: left;width: 4.5%;">
- <div class="layui-input-block">
- <button type="submit" class="layui-btn" lay-submit lay-filter="caca" type="button"
- style="width: 100%;height: 100% !important;background-color: #16baaa00 !important;margin-top: 30%;">
- <img src="/static/home/images/allupload.png" height="100"
- style="max-width: 40px;height: 40px;"/>
- </button>
- </div>
- </div>
- <div style="clear: both;"></div>
- <div class="layui-form-item" id="imgItem">
- <label class="layui-form-label">上传图片:</label>
- <div>
- <div class="layui-upload-drag-self">
- <div id="uploada" style="position:relative;">
- <img src="/static/home/images/upload.png" height="100"
- style="max-width: 100%; width: 100%;"/>
- <input type="hidden" name="thumb" value="">
- <i class="layui-icon layui-icon-clear" id="imgdel"></i>
- </div>
- </div>
- </div>
-
- <!--<label class="layui-form-label">通信对象:</label>-->
- <!--<div>-->
- <!-- <div class="layui-upload-drag-self">-->
- <!-- <div id="uploadBtn3" style="position:relative;">-->
- <!-- <select lay-filter="uploadBtn3" name="type">-->
- <!-- <option value="0">全部</option>-->
- <!-- <option value="1">财政局to公司</option>-->
- <!--<option value="2">财政局to业主</option>-->
- <!-- <option value="3">公司to业主</option>-->
- <!-- </select>-->
- <!-- </div>-->
- <!-- </div>-->
- <!--</div>-->
- </div>
- </form>
- </div>
-
- <div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
- <div id="innerdiv" style="position:absolute;">
- <img id="bigimg" style="" src="" />
- </div>
- </div>
- </div>
- <!--zjl,懂的都懂-->
- <script>
- function comment() {
- var form = layui.form,tool=layui.tool,upload = layui.upload;
- //头像上传
- var uploadInst = upload.render({
- elem: '#uploada'
- , url: '/admin/api/upload'
- , done: function (e) {
- //如果上传失败
- if (e.code == 1) {
- return layer.msg('上传失败');
- }
- //上传成功
- $('#uploada input').attr('value', e.data.filepath);
- $('#uploada img').attr('src', e.data.filepath);
- $('#imgdel').show();
- }
- });
- $('#imgdel').click(()=>{
- $('#uploada input').attr('value', '');
- $('#uploada img').attr('src', '/static/home/images/upload.png');
- $('#imgdel').hide();
- return false;
- })
- $('#uploada').click(()=>{
- console.log(1)
- return false;
- })
- form.on('select(uploadBtn3)', function (data) {
- console.log(data)
- $("#comments").load(location.href + " #comments>*", "type=2&comment_type=" + data.value)
-
- return false;
- });
- let d = 1;
- //监听提交
- form.on('submit(caca)', function (data) {
- if(d){
- let callback = function (e) {
- d = 1
- layer.msg(e.msg);
- $("#text").val("");
- $('#uploada input').attr('value', '');
- $('#uploada img').attr('src', '/static/home/images/upload.png');
- $('#imgdel').hide();
- $("#comments").load(location.href + " #comments>*", "type=2&comment_type=" + data.field.type)
- console.log(location.href+" #comments>*","type=2");
- }
- if(data.field.content === '' && data.field.thumb === ''){
- console.log(data.field)
- layer.msg("请完善内容");
- }else {
- data.field["project_id"] = project_id;
- tool.post("/admin/project.comment/add_company", data.field, callback);
- }
- }
-
- d = 0
- return false;
- });
- }
- </script>
- <script>
- // 限制文本框字数
- function setLength(obj,maxlength,id){
- var num=maxlength-obj.value.length;//获取文本框输入内容的长度
- var leng=id;//获取右下角显示的id
- if(num<0){
- num=0;//如果文本框文字小于零则让它显示为零
- }
- document.getElementById(leng).innerHTML=num+"/50";
- //通过id获取到span标签在页面上的显示并对它的值进行拼接,就是把计算出来的结果+最大限制字数
- }
- </script>
- <script>
- const tx = document.querySelector('#text')
- const total = document.querySelector('.total')
- tx.addEventListener('input', function () {
- console.log(tx.value.length)
- total.innerHTML = `${tx.value.length}/3000字`
- })
- </script>
- <!-- 点击放大图片 -->
- <script src="/static/mobile/js/jquery.min.js"></script>
- <script>
- $(function() {
- $(".img-responsive").click(function (){
- // debugger
- var _this=$(this);
- imgShow("#outerdiv","#innerdiv","#bigimg",_this);
- });
- });
- function imgShow(outerdiv,innerdiv,bigimg,_this){
- // debugger
- var src=_this.attr("src");
- $(bigimg).attr("src",src);
- $("<img/>").attr("src",src).on('load',function () {
- // debugger
- var windowW=$(window).width()
- var windowH=$(window).height();
- var realWidth=this.width;
- var readHeight=this.height;
- var imgWidth,imgHeight;
- var scale=0.8;
- if(realWidth>windowW+scale){
- imgHeight=windowH*scale;
- imgWidth=imgHeight/readHeight*realWidth;
- if(imgWidth>windowW*scale){
- imgWidth=windowW*scale;
- }
- }else if(realWidth>windowW*scale){
- imgWidth=windowW*scale;
- imgHeight=imgWidth/realWidth*readHeight;
- }else {
- imgWidth=realWidth;
- imgHeight=readHeight;
- }
- $(bigimg).css("width",imgWidth);
- var w=(windowW-imgWidth)/2;
- var h=(windowH-imgHeight)/2;
- $(innerdiv).css({"top":h,"left":w});
- $(outerdiv).fadeIn("fast");
- });
- $(outerdiv).click(function (){
- $(this).fadeOut("fast");
- });
- };
- </script>
- </div>
- <?php endif; if($project_five['project_record'] == 1): ?>
- <div class="layui-tab-item">
-
- <div class="p-3 bg-white">
- <table class="layui-hide" id="record" lay-filter="record"></table>
- </div>
- <script type="text/html" id="toolbarrecord">
- <div class="layui-btn-container">
- <button class="layui-btn layui-btn-sm" lay-event="add">+ 新建记录</button>
- </div>
- </script>
- <script>
- function record() {
- let tool = layui.tool, table = layui.table;
- //项目任务
- var allcount;
- parent.layui.recordTable = table.render({
- elem: '#record',
- title: '文档列表',
- toolbar: '#toolbarrecord',
- cellMinWidth: 80,
- parseData: function (res) { // 数据解析回调函数
- // 在这里可以获取数据总数
- allcount = res.data.length;
- return {
- code: res.code, // 数据状态码
- msg: res.msg, // 状态信息
- count: res.count, // 数据总数
- data: res.data // 当前页数据
- };
- },
- url: "/admin/project.record/gslist",
- where: {'project_id': project_id},
- page: false, //开启分页
- limit: 20,
- cols: [[
- {field: 'id', title: '记录编号', width: 80, align: 'center',
- templet: function (d) {
- console.log(allcount,d.LAY_NUM)
- return allcount - (d.LAY_NUM - 1);
-
- }
- },
- {field: 'title', title: '记录内容',
- templet: function (d) {
- var html = '<a class="side-a" lay-event="detail">' + d.content + '</a>';
- return html;
- }
- },
- {field: 'create_time', title: '创建时间', align: 'center', width: 150},
- {field: 'admin_name', title: '创建人', align: 'center', width: 100},
- {field: 'right', fixed: 'right', title: '操作', width: 100, align: 'center',
- templet: function (d) {
- var html = '<div class="layui-btn-group">';
- var btn1 = '<span class="layui-btn layui-btn-xs" lay-event="edit">编辑</span>';
- var btn2 = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</span>';
- return html + btn1 + btn2 + '</div>';
- }
- }
- ]]
- });
- //触发事件
- table.on('toolbar(record)', function (obj) {
- var checkStatus = table.checkStatus(obj.config.id);
- switch (obj.event) {
- case 'add':
- parent.layui.tool.side('/admin/project.record/add_company?project_id=' + project_id); // 项目id
- break;
- }
- });
- table.on('tool(record)', function (obj) {
- var data = obj.data; //获得当前行数据
- if (obj.event === 'detail') { //查看
- let url = '/admin/project.record/view_company?id=' + data.id;// 项目id
- parent.layui.tool.side(url);
- }
- if (obj.event === 'edit') {
- parent.layui.tool.side('/admin/project.record/edit_company?id=' + data.id); // 项目id
- return;
- }
- if (obj.event === 'del') {
- layer.confirm('确定要删除吗?', {
- icon: 3,
- title: '提示'
- }, function (index) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- obj.del();
- }
- }
- tool.delete("/admin/project.record/del_company", {id: data.id}, callback);// 项目id
- layer.close(index);
- });
- }
- })
- }
- </script>
- </div>
- <?php endif; ?>
-
- <div class="layui-tab-item">
-
- <div class="p-3 bg-white">
- <table class="layui-hide" id="appointment" lay-filter="appointment"></table>
- </div>
- <script type="text/html" id="toolbarappointment">
- <div class="layui-btn-container">
- <button class="layui-btn layui-btn-sm" lay-event="add">+ 新增预约</button>
- </div>
- </script>
- <script>
- function appointment() {
- let tool = layui.tool, table = layui.table;
- //项目任务
- var allcount;
- parent.layui.appointmentTable = table.render({
- elem: '#appointment',
- title: '文档列表',
- toolbar: '#toolbarappointment',
- cellMinWidth: 80,
- parseData: function (res) { // 数据解析回调函数
- // 在这里可以获取数据总数
- allcount = res.data.length;
- return {
- code: res.code, // 数据状态码
- msg: res.msg, // 状态信息
- count: res.count, // 数据总数
- data: res.data // 当前页数据
- };
- },
- url: "/admin/project.appointment/datalist_company",
- where: {'project_id': project_id},
- page: false, //开启分页
- limit: 20,
- cols: [[
- {field: 'id', title: '记录编号', width: 80, align: 'center',
- templet: function (d) {
- console.log(allcount,d.LAY_NUM)
- return allcount - (d.LAY_NUM - 1);
-
- }
- },
- {field: 'appointment_time', title: '预约时间',align: 'center', width: 200},
- {field: 'dispatch_num', title: '派遣人数', align: 'center', width: 100},
- {field: 'address_or_remark', title: '地址/备注', align: 'center'},
- {field: 'sponsor_name', title: '发起人', align: 'center', width: 100},
- {field: 'approval_name', title: '审批人', align: 'center', width: 100},
- {field: 'audit_status', title: '状态', align: 'center', width: 100,templet:function(d){
- if(d.audit_status==0){
- return "待审核"
- }else if(d.audit_status==1){
- return "通过"
- }else if(d.audit_status==2){
- return "拒绝"
- }
- }},
- {field: 'audit_remark', title: '回执', align: 'center', width: 150},
- {field: 'right', fixed: 'right', title: '操作', width: 100, align: 'center',
- templet: function (d) {
- if(d.operate && d.audit_status==0){
- var html = '<div class="layui-btn-group">';
- var btn1 = '<span class="layui-btn layui-btn-xs" lay-event="agree">同意</span>';
- var btn2 = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="disagree">拒绝</span>';
- return html + btn1 + btn2 + '</div>';
- }else{
- return "";
- }
- }
- }
- ]]
- });
- //触发事件
- table.on('toolbar(appointment)', function (obj) {
- var checkStatus = table.checkStatus(obj.config.id);
- switch (obj.event) {
- case 'add':
- parent.layui.tool.side('/admin/project.appointment/add_company?project_id=' + project_id); // 项目id
- break;
- }
- });
- table.on('tool(appointment)', function (obj) {
- var data = obj.data; //获得当前行数据
- console.log(data);
- if (obj.event === 'agree') {
- layer.prompt({
- title: '请输入<span style="color: green">回执</span>',
- formType: 2,
- area: ['35vw', '15vw']
- }, function (text, index) {
- let callback = function (e) {
- parent.layui.appointmentTable.reload()
- layer.msg(e.msg);
- setTimeout(function () {
- layer.close(index);
- }, 2000)
- }
- if (text !== "") {
- tool.post("/admin/project.appointment/agree_company", {id: data.id,audit_remark:text,project_id:data.project_id}, callback);// 项目id
- } else {
- layer.msg("回执不能为空")
- }
- })
- return;
- }
- if (obj.event === 'disagree') {
- layer.prompt({
- title: '请输入<span style="color: red">回执</span>',
- formType: 2,
- area: ['35vw', '15vw']
- }, function (text, index) {
- let callback = function (e) {
- parent.layui.appointmentTable.reload()
- layer.msg(e.msg);
- setTimeout(function () {
- layer.close(index);
- }, 2000)
- }
- if (text !== "") {
- tool.post("/admin/project.appointment/disagree_company", {id: data.id,audit_remark:text,project_id:data.project_id}, callback);// 项目id
- } else {
- layer.msg("回执不能为空")
- }
- })
-
-
- return;
- }
- })
- }
- </script>
- </div>
- <?php if($project_five['project_log'] == 1): ?>
- <div class="layui-tab-item">
-
- <div class="layui-form p-4" style="height: 80vh;overflow: auto">
- <?php if(is_array($project_log) || $project_log instanceof \think\Collection || $project_log instanceof \think\Paginator): $i = 0; $__LIST__ = $project_log;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
-
- <div class="layui-timeline" style="padding-left: 0;">
- <div class="layui-timeline-item">
- <i class="layui-icon layui-timeline-axis"></i>
- <div class="layui-timeline-content layui-text">
- <h3 class="layui-timeline-title" style="font-size: 16px;"><?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($vo['create_time'])? strtotime($vo['create_time']) : $vo['create_time'])); ?></h3>
- <p>
- <span><?php echo htmlentities($vo['nickname']); ?></span><span> <b><?php echo htmlentities($vo['action']); ?></b> </span> <span style="color: #187FDD;"> 《<?php echo htmlentities($vo['content']); ?>》</span>
- </p>
- </div>
- </div>
- <?php endforeach; endif; else: echo "" ;endif; ?>
- </div>
- </div>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <!-- /主体 -->
- <!-- 底部 -->
-
- <div class="footer">
- 逸管工程项目管理系统 © www.yiguanfep.com
- <img src="/static/home/images/police.png" alt="" style="width:14.5px;height:16px;">
- <a href="https://beian.mps.gov.cn/#/query/websearch?code=45030202000160 " rel="\"noreferrer'target=\”blank\"" onclick="window.open(this.href); return false;">桂公网安备45030202000160号</a>
- <a href="https://beian.miit.gov.cn/#/Integrated/index" onclick="window.open(this.href); return false;">桂ICP备17000971号</a>
- </div>
-
-
- <!-- /底部 -->
-
- <!-- 脚本 -->
-
- <script>
- var moduleInit = ['tool', 'oaTool', 'employeepicker'];
- var project_id = '<?php echo htmlentities($detail['id']); ?>';
- function gouguInit() {
- var element = layui.element,
- form = layui.form,
- tool = layui.tool;
- first();
- console.log($('#hha').css("display",'block'))
- element.on('tab(project)', function (data) {
- let index = $(this).attr('data-id');
- console.log(index)
- if (index == 1) {
- comment();
- } else if (index == 2) {
- record();
- } else if (index == 3) {
- report();
- } else if (index == 4) {
- project_user()
- } else if (index == 5) {
- } else if (index == 6) {
- console.log("aaa")
- } else if (index == 7) {
- contact()
- } else if (index == 8) {
- appointment();
- }
-
- });
- }
- </script>
- <!-- /脚本 -->
-
- <!-- <script src="/static/assets/layui/layui.js"></script> -->
- <script src="/static/assets/layui/layui.js"></script>
- <script src="/static/assets/third_party/echart/echarts.min.js"></script>
- <script src="/static/assets/gougu/gouguInit.js"></script>
- <script src="https://unpkg.com/pinyin-pro"></script>
- <script>
-
- var { pinyin } = pinyinPro;
- </script>
-
-
- <!-- 统计代码 -->
-
- <!-- /统计代码 -->
- </body>
- </html>
|