123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311 |
- <style>
- .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%; */
- 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;
- /* background-color: rgb(255, 255, 255); */
- }
- .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: 0px;
- line-height:0px;
- 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;
- height: 0 !important;
- }
- .form-title {
- background-color: rgb(241, 241, 241);
- color: rgb(95, 95, 95);
- border-color: rgb(241, 241, 241);
- font-weight: 600;
- }
- /* .fujianimg img {
- width: 5vw;
- height: 5vh;
- } */
- .forleft {
- text-align: left !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;
- }
- /* 倒计时 */
- .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;
- }
- #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>
- <!--业主项目审核以下-->
- {if $detail.proprietor_status<2}
- <form class="layui-form p-4">
- <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">
- <th class="form-title">项目名称 <font style="color: red !important;">*</font></th>
- <th colspan="2">
- <input type="text" name="project_name" lay-verify="required" lay-reqText="请完善项目名称" value="{$detail.project_name}"
- autocomplete="off" placeholder="请输入项目名称" class="layui-input">
- </th>
- <th class="form-title">项目编号 <font style="color: red !important;">*</font></th>
- <th colspan="2">
- <input type="text" name="project_num" lay-verify="required" lay-reqText="请完善项目编号" value="{$detail.project_num}"
- autocomplete="off" placeholder="请输入项目编号" class="layui-input">
- </th>
- <th class="form-title">送审金额 <font style="color: red !important;">*</font></th>
- <th colspan="2">
- <input type="text" id="sent_review_amount" value="{$detail.sent_review_amount}" name="sent_review_amount" autocomplete="off" placeholder="请输入送审金额" class="layui-input">
- </th>
- </tr>
- <tr>
- <th class="form-title">工程类型<font style="color: red !important;">*</font></th>
- <th colspan="2">
- <div>
- <select name="engineering_type1" lay-verify="required">
- <option value="">请选择项目类型</option>
- <option value="1" {eq name="$detail.engineering_type1" value="1"} selected {/eq}>预算</option>
- <option value="2"{eq name="$detail.engineering_type1" value="2"} selected {/eq}>结算</option>
- <option value="3" {eq name="$detail.engineering_type1" value="3"} selected {/eq}>概算</option>
- <option value="4" {eq name="$detail.engineering_type1" value="4"} selected {/eq}>决算</option>
- <option value="5" {eq name="$detail.engineering_type1" value="5"} selected {/eq}>工程总承包(EPC)</option>
- </select>
- </div>
- </th>
- <th class="form-title">——</th>
- <th colspan="2">
- <div>
- <select name="engineering_type2" lay-verify="required">
- <option value="">请选择项目类型</option>
- <option value="1" {eq name="$detail.engineering_type2" value="1"} selected {/eq}>审核</option>
- <option value="2" {eq name="$detail.engineering_type2" value="2"} selected {/eq}>编制</option>
- </select>
- </div>
- </th>
- <th class="form-title entrust_unit">委托单位 <font style="color: red!important;">*</font></th>
- <th colspan="2" class="entrust_unit">
- <input type="text" name="entrust_unit_name" value="{$entrust_unit_name}" autocomplete="off" class="layui-input" disabled>
- <input type="hidden" name="entrust_unit" value="{$entrust_unit}" autocomplete="off" class="layui-input" disabled>
- </th>
- </tr>
- <th class="form-title">审批人(一)<font style="color: red !important;">*</font></th>
- <th colspan="2">
- <select name="sent_review_approver" lay-verify="required" lay-reqText="请选择审批人">
- <option value="">请选择审批人</option>
- {dump($person)}
- {volist name="person" id="v"}
- <option value="{$v.id}" {eq name="$detail.sent_review_approver" value="$v.id" } selected="" {/eq}>{$v.nickname}</option>
- {/volist}
- </select>
- </th>
- <th class="form-title">审批人(二)</th>
- <th colspan="2">
- <select name="sent_review_second_approver" lay-reqText="请选择审批人">
- <option value="">请选择第二审批人(可选)</option>
- {dump($person)}
- {volist name="person" id="v"}
- <option value="{$v.id}" {eq name="$detail.sent_review_second_approver" value="$v.id"} selected="" {/eq} {if!isset($detail.sent_review_second_approver)}name=""{/if}>{$v.nickname}</option>
- {/volist}
- </select>
- </th>
- </tr>
- <tr>
- <th colspan="9" class="forleft">相关附件
- <button class="layui-btn layui-btn-xs layui-btn-danger" style="float: right;" type="button"
- id="uploadBtn">上传附件
- </button>
- </th>
- </tr>
- <tr>
- <th colspan="9" class="fujianimg" style="padding: 9px 0;">
- <div id="filesBox2">
- <div class="filelist" id="filesBigBox">
- <ul id="filesBox" style="overflow: scroll;">
- {:fileCard($file_array)}
- </ul>
- </div>
- {empty name="$file_array" }
- <div class="layui-data-none">暂无附件</div>
- {/empty}
- </div>
- </th>
- </tr>
- </table>
- <div class="py-3">
- <input type="hidden" name="id" value="{$detail.id}"/>
- {if $detail.proprietor_status==0}
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="add">保存</button>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="save">提交</button>
- {/if}
- <!-- //审核中-->
- {if $detail.proprietor_status == 1}
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="withdraw">撤回</button>
- {/if}
- </div>
- </form>
- {else/}
- <!--之后的预览-->
- <form class="layui-form p-4">
- <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">
- {if $field.project_status == 1}
- <th class="form-title">项目状态</th>
- <th>
- {switch $detail.project_status}
- {case 1}立项中{/case}
- {case 2}审批中{/case}
- {case 3}待接收{/case}
- {case 4}待分配{/case}
- {case 5}作业中{/case}
- {case 6}归档中{/case}
- {case 7}退审中{/case}
- {case 8}已归档{/case}
- {case 9}已退审{/case}
- {case 0}
- {switch $detail.proprietor_status}
- {case 0}立项中{/case}
- {case 1}审核中{/case}
- {case 2}待接收{/case}
- {/switch}
- {/case}
- {default /}未知
- {/switch}
- </th>
- {/if}
- {if $field.project_name == 1}
- <th class="form-title">项目名称</th>
- <th colspan="3">{$detail.project_name}</th>
- {/if}
- {if $field.project_num == 1}
- <th class="form-title">项目编号</th>
- <th colspan="2">{$detail.project_num}</th>
- {/if}
- </tr>
- <tr>
- {if $field.project_time == 1}
- <th class="form-title">项目周期</th>
- {if $detail.project_start_time != null}
- <th colspan="8" style="text-align: left; padding-left: 3.5vw;">{$detail.project_start_time|date="Y-m-d"} 至 {$detail.project_end_time|date="Y-m-d"}</th>
- {else/}
- <th colspan="8" style="text-align: left; padding-left: 3.5vw;"> </th>
- {/if}
- {/if}
- </tr>
- <tr>
- {if $field.engineering_type == 1}
- <th class="form-title">工程类型</th>
- <th>
- {if $detail.engineering_type1==1}
- 预算
- {elseif $detail.engineering_type1==2}
- 结算
- {elseif $detail.engineering_type1==3}
- 概算
- {elseif $detail.engineering_type1==4}
- 决算
- {elseif $detail.engineering_type1==5}
- 工程总承包(EPC)
- {/if}
- </th>
- <th class="form-title">——</th>
- <th>
- {if $detail.engineering_type2==1}审核{else}编制{/if}
- </th>
- {/if}
- {if $field.engineering_category == 1}
- <th class="form-title">工程类别</th>
- <th>{$detail.engineering_category}</th>
- {/if}
- {if $field.project_region == 1}
- <th class="form-title">项目区域</th>
- <th colspan="2">
- {$detail.province}-{$detail.city}-{$detail.area}
- </th>
- {/if}
- </tr>
- <tr>
- {if $field.fiscal_nature == 1}
- <th class="form-title">资金性质</th>
- <th>{$detail.fiscal_nature}</th>
- {/if}
- {if $field.project_scale == 1}
- <th class="form-title">项目规模</th>
- <th colspan="3">{$detail.project_scale}</th>
- {/if}
- {if $field.charge_standard == 1}
- <th class="form-title">收费标准</th>
- <th colspan="2">{$detail.charge_standard}</th>
- {/if}
- </tr>
- {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 || $field.construction_unit == 1 || $field.construction_head == 1}
- <tr>
- <th colspan="9" class="forleft">相关单位</th>
- </tr>
- <tr>
- {if $field.entrust_unit == 1}
- <th class="form-title">委托单位</th>
- <th>{$detail.entrust_unit_name}</th>
- {/if}
- {if $field.entrust_head == 1}
- <th class="form-title">负责人</th>
- <th>{$detail.entrust_maker_name}</th>
- {/if}
- {if $field.sent_review_unit == 1}
- <th class="form-title">送审单位</th>
- <th>{$detail.sent_review_unit_name}</th>
- {/if}
- {if $field.sent_review_head == 1}
- <th class="form-title">负责人</th>
- <th colspan="2">{$detail.sent_review_head_name}</th>
- {/if}
- </tr>
- <tr>
- {if $field.review_unit == 1}
- <th class="form-title">评审机构</th>
- <th>{$detail.review_unit_name}</th>
- {/if}
- {if $field.review_head == 1}
- <th class="form-title">项目负责人</th>
- <th>{$detail.review_head_name}</th>
- {/if}
- {if $field.operate_name == 1}
- <th class="form-title">作业负责人</th>
- <th>{$detail.operate_head_name}</th>
- {/if}
- {if $field.operate_team_names == 1}
- <th class="form-title">作业成员</th>
- <th colspan="2">{$detail.operate_team_names}</th>
- {/if}
- </tr>
- <tr>
- {if $field.construction_unit == 1}
- <th class="form-title" colspan="1">施工单位</th>
- <th colspan="1">{$detail.construction_unit}</th>
- {/if}
- {if $field.construction_head == 1}
- <th class="form-title" colspan="1">负责人</th>
- <th colspan="6">{$detail.construction_head}</th>
- {/if}
- </tr>
- {/if}
- {if $field.sent_review_amount == 1 || $field.authorize_amount == 1 || $field.review_add_reduce_amount == 1 || $field.review_add_reduce_rate == 1 || $field.sent_review_cost == 1 || $field.sent_review_approver_amount == 1 || $field.construction_approver_amount == 1 || $field.report_time == 1}
- <tr>
- <th colspan="9" class="forleft">金额详情</th>
- </tr>
- <tr>
- {if $field.sent_review_amount == 1}
- <th class="form-title" colspan="1">送审金额(元)</th>
- <th colspan="2">{$detail.sent_review_amount}</th>
- {/if}
- {if $field.authorize_amount == 1}
- <th class="form-title" colspan="1">审定金额(元)</th>
- <th colspan="2">{$detail.authorize_amount}</th>
- {/if}
- {if $field.review_add_reduce_amount == 1}
- <th class="form-title" colspan="1">审增金额(元)</th>
- <th colspan="2">{$detail.review_add_amount}</th>
- {/if}
- </tr>
- <tr>
- {if $field.review_add_reduce_amount == 1}
- <th class="form-title" colspan="1">审减金额(元)</th>
- <th colspan="2">{$detail.review_reduce_amount}</th>
- {/if}
- {if $field.review_add_reduce_rate == 1}
- <th class="form-title" colspan="1">审增减率(%)</th>
- <th colspan="2">{$detail.review_add_reduce_rate}</th>
- {/if}
- {if $field.sent_review_cost == 1}
- <th class="form-title" colspan="1">送审服务费 (元)</th>
- <th colspan="2">{$detail.sent_review_cost}</th>
- {/if}
- </tr>
- <tr>
- {if $field.sent_review_approver_amount == 1}
- <th class="form-title forright" colspan="1">
- 送审单位承担<br>审核费(元)
- </th>
- <th colspan="2">{$detail.sent_review_approver_amount}</th>
- {/if}
- {if $field.construction_approver_amount == 1}
- <th class="form-title forright" colspan="2">
- 施工单位负责<br>核减超5%评审费部分(元)
- </th>
- <th colspan="2">{$detail.construction_approver_amount}</th>
- {/if}
- {if $field.report_time == 1}
- <th class="form-title" colspan="1">报告时间</th>
- <th colspan="1" style="text-align: left; padding-left: 3.5vw;">{if
- $detail.report_time!=0}{$detail.report_time|date="Y-m-d"}{/if}
- </th>
- {/if}
- </tr>
- {/if}
- <tr>
- <th colspan="9" class="forleft">相关附件
- <!--<button class="layui-btn layui-btn-xs layui-btn-danger" style="float: right;" type="button"-->
- <!-- id="uploadBtn">上传附件-->
- <!--</button>-->
- <!--<button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-on="page" style="float: right;">上传附件</button>-->
- <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="{$detail.id}"/>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="savetime">保存</button>
- </div>
- </form>
- {/if}
- <script>
- 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 // 当前页数据
- };
- },
- 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>{{d.create_time}}</div>"
- 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>';
- }
- }
- ]]
- });
- function res(){
- table.reload('get_file');
- }
- $('#filesBox2').on('click', '.file-del', function (e) {
- // console.log( $(this).attr('data-id'))
- let id = $(this).attr('data-id');
- layer.confirm('确定要删除该文件吗?请慎重', {icon: 3, title: '提示'}, function (index) {
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- res()
- }
- }
- tool.delete("/admin/project.api/delete_file", {id: id}, callback);// 删除附件
- layer.close(index);
- });
- })
- //上传附件弹出窗
- 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={$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);
- }
- });
- },
- })
- });
- oaTool.addFile({
- type: 1,
- isSave: true,
- ajaxSave: function (res) {
- let callback = function (e) {
- if("msg" in e){
- layer.msg(e.msg);
- }else{
- layer.msg('上传成功!')
- }
- setTimeout(function () {
- $("#filesBox2").load(location.href+" #filesBox>*","type=2")
- }, 500)
- }
- // console.log(1);
- // console.log(res,"{$detail.id}")
- tool.post("/admin/project.api/add_file", { // 上传附件
- 'topic_id': "{$detail.id}",
- 'file_id': res.data.id,
- 'file_name': res.data.name,
- 'module': 'project'
- }, callback);
- }
- });
- // var form = layui.form, tool = layui.tool, oaTool = layui.oaTool;
- //日期选择
- layui.laydate.render({
- elem: '#date',
- range: ['#start_time', '#end_time'],
- rangeLinked: true
- });
- // var selectedNature = $('input[name="fiscal_nature"]:checked').val();
- // if (selectedNature == "财政资金") {
- // $(".entrust_unit").show();
- // $(".review_unit").hide();
- // } else {
- // $(".review_unit").show();
- // $(".entrust_unit").hide();
- // }
- //radio选择
- form.on('radio(tax)', function (data) {
- if (data.value == "财政资金") {
- console.log(1)
- $(".entrust_unit").show();
- $(".review_unit").hide();
- } else {
- $(".review_unit").show();
- $(".entrust_unit").hide();
- }
- });
- $('.customer-picker').on('click', function () {
- let that = $(this);
- let callback = function(data){
- console.log(data);
- $('[name="review_unit"]').val(data.id);
- $('[name="review_unit_name"]').val(data.title);
- }
- oaTool.customerPicker(callback);
- });
- form.on('submit(add)', function (data) {
- if(data.field.fiscal_nature=="财政资金"){
- delete data.field.review_unit;
- delete data.field.review_unit_name;
- if(data.field.entrust_unit==""&&data.field.entrust_unit_name==""){
- layer.msg("请选择委托单位")
- return false;
- }
- }else {
- delete data.field.entrust_unit;
- delete data.field.entrust_unit_name;
- if(data.field.review_unit==""&&data.field.review_unit_name==""){
- layer.msg("请选择评审单位")
- return false;
- }
- }
- let c = 1;
- 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_proprietor/edit_main", data.field, callback);
- }
- c = 0
- return false;
- });
- let a = 1;
- //监听提交
- form.on('submit(webform)', function (data) {
- if(a){
- let callback = function (e) {
- a = 1
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- }
- }
- if(data.field.engineering_type1!==""&&data.field.engineering_type2!==""){
- 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_proprietor/edit_main", data.field, callback);
- }
- a = 0
- return false;
- });
- let a1 = 1;
- form.on('submit(save)', function (data) {
- if(a1){
- let callback = function (e) {
- a1 = 1
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- }
- }
- if(data.field.engineering_type1!==""&&data.field.engineering_type2!==""){
- 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_proprietor/save", data.field, callback);
- }
- a1 = 0
- return false;
- });
- let a2 = 1;
- form.on('submit(withdraw)', function (data) {
- if(a2){
- let callback = function (e) {
- a2 = 1
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- }
- }
- if(data.field.engineering_type1!==""&&data.field.engineering_type2!==""){
- 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_proprietor/withdraw", data.field, callback);
- }
- a2 = 0
- return false;
- });
- let a3 = 1;
- form.on('submit(savetime)', function (data) {
- if(a3){
- let callback = function (e) {
- a3 = 1
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- }
- }
- if(data.field.engineering_type1!==""&&data.field.engineering_type2!==""){
- 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_proprietor/edit_main", data.field, callback);
- }
- a3 = 0
- return false;
- });
- //项目区域
- 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("{$detail.province}","{$detail.city}","{$detail.area}")
- })
- }
- </script>
- <script>
- // 获取具有指定 ID 的 <ul> 元素
- var ulElement = document.getElementById("filesBox");
- // 检查 <ul> 元素的子元素数量
- if (ulElement.children.length === 0) {
- // 如果子元素数量为 0,隐藏 <ul> 元素
- ulElement.style.display = "none";
- }
- </script>
|