| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 | <%include ./common.html %><div class="panel-content">    <% if(Object.keys(selectedCompilation).length > 0) {%>    <div class="panel-title">        <div class="title-main">            <h2>                <%= selectedCompilation.name %>                <% if(selectedCompilation.is_release) {%>                <span class="text-muted" style="margin-left: 5px;">已发布 <%= moment(selectedCompilation.release_time).format('YYYY-MM-DD')%></span>                <% } %>                <a href="javascript:void(0);" data-id="<%= selectedCompilation._id %>" data-status="<%= selectedCompilation.is_release ? 0 : 1 %>" class="btn btn-primary btn-sm pull-right" id="release"><% if(selectedCompilation.is_release) {%>取消<% }else{ %>发布<% } %>编办</a>            </h2>        </div>    </div>    <!--养护中计价方式为项目类别-->    <div class="content-wrap">        <div class="c-header" style="padding:0">            <ul class="nav nav-tabs">                <% if(selectedCompilation.name.includes('公路造价')) { %>                <li role="presentation" class="active"><a href="#suggestion" aria-controls="suggestion" role="tab" data-toggle="tab">建议估算</a></li>                <li role="presentation"><a href="#feasibility" aria-controls="feasibility" role="tab" data-toggle="tab">可行性估算</a></li>                <li role="presentation"><a href="#rough" aria-controls="rough" role="tab" data-toggle="tab">概算</a></li>                <% } %>                <li role="presentation" class=<%= selectedCompilation.name.includes('公路造价') ? '' : 'active' %>><a href="#bill" aria-controls="bill" role="tab" data-toggle="tab">                    <% if(title === '公路2.0') { %>                        清单计价                    <% } else { %>                        预算                    <% } %>                </a></li>                <li role="presentation"><a href="#ration" aria-controls="ration" role="tab" data-toggle="tab">工程量清单</a></li>                <li role="presentation"><a href="#estimation" aria-controls="estimation" role="tab" data-toggle="tab">估算</a></li>                            </ul>        </div>        <div class="c-body tab-content">            <% if(selectedCompilation.name.includes('公路造价')) { %>            <div class="tab-pane active" role="tabpanel" id="suggestion">                <a class="btn btn-default btn-sm" href="#" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>                <table class="table">                    <thead>                    <tr>                        <th>计价规则</th>                        <th>启用/禁用</th>                        <th>操作</th>                    </tr>                    </thead>                    <tbody>                    <% if (selectedCompilation.suggestion_valuation && selectedCompilation.suggestion_valuation.length > 0) { %>                    <% selectedCompilation.suggestion_valuation.forEach(function(suggestion) { %>                    <tr>                        <td><%= suggestion.name %></td>                        <td>                            <% if (suggestion.enable) { %>                            <div class="btn-group enable" data-id="<%= suggestion.id %>">                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>                                <button class="btn btn-default" title="禁用">禁用</button>                            </div>                            <% }else { %>                            <div class="btn-group enable" data-id="<%= suggestion.id %>">                                <button class="btn btn-default" title="开启">开启</button>                                <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>                            </div>                            <% } %>                        </td>                        <td>                            <a href="/compilation/valuation/suggestion/<%= suggestion.id %>" class="btn btn-sm">编辑</a>                            <a onclick="$('#del').attr('selectedId', '<%= suggestion.id %>')" href="#" data-id="<%= suggestion.id %>" data-toggle="modal" data-target="#del" class="btn btn-sm text-danger">删除</a>                        </td>                    </tr>                    <% }) %>                    <% } %>                    </tbody>                </table>            </div>            <div class="tab-pane" role="tabpanel" id="feasibility">                <a class="btn btn-default btn-sm" href="#" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>                <table class="table">                    <thead>                    <tr>                        <th>计价规则</th>                        <th>启用/禁用</th>                        <th>操作</th>                    </tr>                    </thead>                    <tbody>                    <% if (selectedCompilation.feasibility_valuation && selectedCompilation.feasibility_valuation.length > 0) { %>                    <% selectedCompilation.feasibility_valuation.forEach(function(feasibility) { %>                    <tr>                        <td><%= feasibility.name %></td>                        <td>                            <% if (feasibility.enable) { %>                            <div class="btn-group enable" data-id="<%= feasibility.id %>">                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>                                <button class="btn btn-default" title="禁用">禁用</button>                            </div>                            <% }else { %>                            <div class="btn-group enable" data-id="<%= feasibility.id %>">                                <button class="btn btn-default" title="开启">开启</button>                                <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>                            </div>                            <% } %>                        </td>                        <td>                            <a href="/compilation/valuation/feasibility/<%= feasibility.id %>" class="btn btn-sm">编辑</a>                            <a onclick="$('#del').attr('selectedId', '<%= feasibility.id %>')" href="#" data-id="<%= feasibility.id %>" data-toggle="modal" data-target="#del" class="btn btn-sm text-danger">删除</a>                        </td>                    </tr>                    <% }) %>                    <% } %>                    </tbody>                </table>            </div>            <div class="tab-pane" role="tabpanel" id="rough">                <a class="btn btn-default btn-sm" href="#" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>                <table class="table">                    <thead>                    <tr>                        <th>计价规则</th>                        <th>启用/禁用</th>                        <th>操作</th>                    </tr>                    </thead>                    <tbody>                    <% if (selectedCompilation.rough_valuation && selectedCompilation.rough_valuation.length > 0) { %>                    <% selectedCompilation.rough_valuation.forEach(function(rough) { %>                    <tr>                        <td><%= rough.name %></td>                        <td>                            <% if (rough.enable) { %>                            <div class="btn-group enable" data-id="<%= rough.id %>">                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>                                <button class="btn btn-default" title="禁用">禁用</button>                            </div>                            <% }else { %>                            <div class="btn-group enable" data-id="<%= rough.id %>">                                <button class="btn btn-default" title="开启">开启</button>                                <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>                            </div>                            <% } %>                        </td>                        <td>                            <a href="/compilation/valuation/rough/<%= rough.id %>" class="btn btn-sm">编辑</a>                            <a onclick="$('#del').attr('selectedId', '<%= rough.id %>')" href="#" data-id="<%= rough.id %>" data-toggle="modal" data-target="#del" class="btn btn-sm text-danger">删除</a>                        </td>                    </tr>                    <% }) %>                    <% } %>                    </tbody>                </table>            </div>            <% } %>            <div class="<%= selectedCompilation.name.includes('公路造价') ? 'tab-pane' : 'tab-pane active' %>" role="tabpanel" id="bill">                <a class="btn btn-default btn-sm" href="#" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>                <table class="table">                    <thead>                    <tr>                        <th>计价规则</th>                        <th>启用/禁用</th>                        <% if(title === '公路2.0') { %>                            <th>适用类型</th>                        <% } %>                        <th>操作</th>                    </tr>                    </thead>                    <tbody>                    <% if (selectedCompilation.bill_valuation.length > 0) { %>                    <% selectedCompilation.bill_valuation.forEach(function(bill) { %>                    <tr>                        <td><%= bill.name %></td>                        <td>                            <% if (bill.enable) { %>                            <div class="btn-group enable" data-id="<%= bill.id %>">                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>                                <button class="btn btn-default" title="禁用">禁用</button>                            </div>                            <% }else { %>                            <div class="btn-group enable" data-id="<%= bill.id %>">                                <button class="btn btn-default" title="开启">开启</button>                                <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>                            </div>                            <% } %>                        </td>                        <% if(title === '公路2.0') { %>                        <td>                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_suggest_gusuan" <% if (bill.fileTypes && bill.fileTypes.includes(16)) { %> checked <% } %> /> 建议估算                               <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_gusuan" <% if (bill.fileTypes && bill.fileTypes.includes(15)) { %> checked <% } %> /> 可行性估算                               <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_estimate"  <% if (bill.fileTypes && bill.fileTypes.includes(5)) { %> checked <% } %>  /> 概算                                 <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_submission" <% if (bill.fileTypes && bill.fileTypes.includes(1)) { %> checked <% } %>  /> 预算                                   <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_three_bill_budget" <% if (bill.fileTypes && bill.fileTypes.includes(18)) { %> checked <% } %>  /> 三级清单预算                                <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_bill_budget" <% if (bill.fileTypes && bill.fileTypes.includes(19)) { %> checked <% } %>  /> 清单预算                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_changeBudget" <% if (bill.fileTypes && bill.fileTypes.includes(4)) { %> checked <% } %>  /> 变更预算                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_settlement" <% if (bill.fileTypes && bill.fileTypes.includes(10)) { %> checked <% } %>  /> 结算                         </td>                        <% } %>                        <td>                            <a href="/compilation/valuation/bill/<%= bill.id %>" class="btn btn-sm">编辑</a>                            <a onclick="$('#del').attr('selectedId', '<%= bill.id %>')" href="#" data-id="<%= bill.id %>" data-toggle="modal" data-target="#del" class="btn btn-sm text-danger">删除</a>                            <!--<a href="/compilation/valuation/bill/delete/<%= bill.id %>" class="btn btn-sm text-danger">删除</a>-->                        </td>                    </tr>                    <% }) %>                    <% } %>                    </tbody>                </table>            </div>            <div class="tab-pane" role="tabpanel" id="ration">                <a class="btn btn-default btn-sm" href="javascript:void(0)" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>                <table class="table">                    <thead>                    <tr>                        <th>计价规则</th>                        <th>启用/禁用</th>                        <th>操作</th>                    </tr>                    </thead>                    <tbody>                    <% if (selectedCompilation.ration_valuation.length > 0) { %>                    <% selectedCompilation.ration_valuation.forEach(function(ration) { %>                    <tr>                        <td><%= ration.name %></td>                        <td>                            <% if (ration.enable) { %>                            <div class="btn-group enable" data-id="<%= ration.id %>">                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>                                <button class="btn btn-default" title="禁用">禁用</button>                            </div>                            <% }else { %>                            <div class="btn-group enable" data-id="<%= ration.id %>">                                <button class="btn btn-default" title="开启">开启</button>                                <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>                            </div>                            <% } %>                        </td>                        <td>                            <a href="/compilation/valuation/ration/<%= ration.id %>" class="btn btn-sm">编辑</a>                            <a href="/compilation/valuation/ration/delete/<%= ration.id %>" class="btn btn-sm text-danger">删除</a>                        </td>                    </tr>                    <% }) %>                    <% } %>                    </tbody>                </table>            </div>            <div class="tab-pane" role="tabpanel" id="estimation">                <a class="btn btn-default btn-sm" href="javascript:void(0)" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>                <table class="table">                    <thead>                    <tr>                        <th>计价规则</th>                        <th>启用/禁用</th>                        <th>操作</th>                    </tr>                    </thead>                    <tbody>                    <% if (selectedCompilation.estimation_valuation && selectedCompilation.estimation_valuation.length > 0) { %>                    <% selectedCompilation.estimation_valuation.forEach(function(estimation) { %>                    <tr>                        <td><%= estimation.name %></td>                        <td>                            <% if (estimation.enable) { %>                            <div class="btn-group enable" data-id="<%= estimation.id %>">                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>                                <button class="btn btn-default" title="禁用">禁用</button>                            </div>                            <% }else { %>                            <div class="btn-group enable" data-id="<%= estimation.id %>">                                <button class="btn btn-default" title="开启">开启</button>                                <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>                            </div>                            <% } %>                        </td>                        <td>                            <a href="/compilation/valuation/estimation/<%= estimation.id %>" class="btn btn-sm">编辑</a>                            <a href="/compilation/valuation/estimation/delete/<%= estimation.id %>" class="btn btn-sm text-danger">删除</a>                        </td>                    </tr>                    <% }) %>                    <% } %>                    </tbody>                </table>            </div>            <table class="table">                <tr><td><p>软件版本介绍</p><textarea id="description" class="form-control" placeholder="请简要描述改版本"><%= selectedCompilation.description%></textarea></td></tr>                <tr><td><span>重写路径:</span><input class="form-control" type="text" id="overWriteUrl" value="<%= selectedCompilation.overWriteUrl%>"></td></tr>                <tr><td><span>例题建设项目ID:</span><input class="form-control" type="text" id="example" value="<%= selectedCompilation.example%>"></td></tr>                <tr><td><p>显示办事处销售信息</p>                    <select class="form-control" style="width:200px" id="category-select">                        <% categoryList.forEach(function(category) { %>                        <option value="<%= category.id %>" <% if (selectedCompilation.categoryID !== undefined && category.id === selectedCompilation.categoryID) { %>selected="selected"<% } %> ><%= category.name %></option>                        <% }) %>                    </select>                </td></tr>                <tr><td><p>默认工程所在地</p>                    <select class="form-control" style="width:200px" id="location-select">                        <option value=""></option>                        <% locationList.forEach(function(location) { %>                            <option value="<%= location %>" <% if (selectedCompilation.defaultLocation !== undefined && location === selectedCompilation.defaultLocation) { %>selected="selected"<% } %> ><%= location %></option>                            <% }) %>                    </select>                </td></tr>                <tr>                    <td>                        <p><span> 提供免费版:</span> <input type="checkbox" id="freeUse"  <% if (selectedCompilation.freeUse) { %> checked <% } %>></p>                           </td>                </tr>                <tr><td><span>版本号:</span><input class="form-control" type="text" id="edition" value="<%= selectedCompilation.edition%>"></td></tr>                <tr>                    <td><span>序号:</span><input class="form-control" type="number" id="serialNumber"                            value="<%= selectedCompilation.serialNumber%>">                    </td>                </tr>            </table>        </div>        <input type="hidden" name="id" value="<%= selectedCompilation._id %>" id="compilation-id">        <% } %>	</div></div><script type="text/javascript" src="/web/users/js/compilation.js"></script><%include ../compilation/modal.html %>
 |