| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 | <% include ./material_sub_menu.ejs %><div class="panel-content">    <div class="panel-title">        <div class="title-main d-flex justify-content-between">            <% include ./material_sub_mini_menu.ejs %>            <div>                <% if ((material.status === auditConst.status.uncheck || material.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === material.user_id) { %>                    <div class="d-inline-block">                        <a href="javascript: void(0);" id="add" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="新增"><i class="fa fa-plus" aria-hidden="true"></i></a>                        <a href="javascript: void(0);" id="del" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>                    </div>                <% } %>                <div class="d-inline-block ml-3">                    本期调差计量期:第<span class="mx-2"><%= material.s_order.split(',').join(',') %></span>期                </div>                <div class="d-inline-block ml-2" >                    <a href="#cc-digits" class="btn btn-sm btn-light text-primary" data-toggle="modal" data-placement="bottom" title="小数位数" data-target="#cc-digits" ><i class="fa fa-cog" aria-hidden="true"></i></a>                </div>                <!--<div class="d-inline-block ml-3" style="display: none!important;">-->                    <!--本期价差:<b id="ex_expr"><%- material.ex_expr %></b>-->                <!--</div>-->            </div>            <div class="ml-auto">                <% if (ctx.session.sessionProject.page_show.openMaterialChecklist && material.order === material.highOrder) { %>                    <a href="/tender/<%- ctx.tender.id %>/measure/material/<%- material.highOrder %>/checklist" class="btn btn-sm btn-outline-primary">批量设置调差清单</a>                <% } %>            </div>        </div>    </div>    <div class="content-wrap pr-46">        <div class="c-header p-0">        </div>        <div class="row w-100 sub-content">            <div id="left-view" class="c-body" style="width: 100%">                <!--上部分-->                <div class="sjs-height-1" id="material-exponent-spread">                </div>                <!--下部分-->                <div class="bcontent-wrap" id="main-bottom">                    <div id="main-resize" class="resize-y" r-Type="height" div1=".sjs-height-1" div2=".bcontent-wrap" title="调整大小"><!--调整上下高度条--></div>                    <div class="bc-bar mb-1">                        <div class="input-group input-group-sm ">                            <div class="input-group-prepend">                                <span class="input-group-text" id="basic-addon1">增值税税率</span>                            </div>                            <input id="rateInput" class="form-control form-control-sm col-1" <% if (material.readOnly || material.editForAudit) { %>disabled<% } %> type="number" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" min="0" step="1" max="100" value="<%- material.exponent_rate %>">                            <% if (!material.readOnly || !material.editForAudit) { %>                                <div class="dropdown-menu">                                    <a class="dropdown-item changeRate" href="javascript:void(0);" data-value="9">9%</a>                                    <a class="dropdown-item changeRate" href="javascript:void(0);" data-value="10">10%</a>                                    <a class="dropdown-item changeRate" href="javascript:void(0);" data-value="11">11%</a>                                </div>                            <% } %>                            <!--<select class="form-control form-control-sm col-1" id="changeRate">-->                                <!--<% if (!material.readOnly && !material.editForAudit) { %>-->                                    <!--<option value="9" <% if(material.exponent_rate === 9) { %>selected<% } %>>9%</option>-->                                    <!--<option value="10" <% if(material.exponent_rate === 10) { %>selected<% } %>>10%</option>-->                                    <!--<option value="11" <% if(material.exponent_rate === 11) { %>selected<% } %>>11%</option>-->                                <!--<% } else { %>-->                                    <!--<option value="<%= material.exponent_rate %>" selected><%= material.exponent_rate %>%</option>-->                                <!--<% } %>-->                            <!--</select>-->                        </div>                    </div>                    <% if (!material.material_tax && !old_had_tax) { %>                        <div class="sp-wrap" style="max-width: 800px;min-width: 500px;">                            <div class="col-12 p-0">                                <table class="table table-sm table-bordered">                                    <tr><th rowspan="2"></th><th colspan="2" class="text-center">信息价</th><th colspan="2" class="text-center">价格指数</th></tr>                                    <tr class="text-center"><th>本期金额</th><th>截止本期金额</th>                                        <th>本期金额                                            <a href="javascript:void(0);" id="ex_expr" data-toggle="tooltip" data-placement="bottom" title="本期价差:<%- material.ex_expr ? material.ex_expr : '' %>"><i class="fa fa-question-circle-o"></i></a></th>                                        <th>截止本期金额</th></tr>                                    <tr id="tp_set"><td>材料价差费用</td>                                        <td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(material.m_tp, material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.m_tp !== null || material.pre_tp !== null ? ctx.helper.add(material.pre_tp, ctx.helper.round(material.m_tp, material.decimal.tp)) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.add(material.ex_pre_tp, ctx.helper.round(material.ex_tp, material.decimal.tp)) : null %></td>                                    </tr>                                    <tr id="rate_set"><td>材料价差费用(含建筑税)</td>                                        <td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp)) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp)) : null %></td>                                    </tr>                                </table>                            </div>                        </div>                    <% } else { %>                        <div class="sp-wrap" style="max-width: 800px;min-width: 500px;">                            <div class="col-12 p-0">                                <table class="table table-sm table-bordered">                                    <tr><th rowspan="2"></th><th colspan="2" class="text-center">信息价</th><th colspan="2" class="text-center">价格指数</th></tr>                                    <tr class="text-center"><th>本期金额</th><th>截止本期金额</th>                                        <th>本期金额                                            <a href="javascript:void(0);" id="ex_expr" data-toggle="tooltip" data-placement="bottom" title="本期价差:<%- material.ex_expr ? material.ex_expr : '' %>"><i class="fa fa-question-circle-o"></i></a></th>                                        <th>截止本期金额</th></tr>                                    <tr id="tp_set"><td>材料价差费用</td>                                        <td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(material.m_tp, material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.m_tp !== null || material.pre_tp !== null ? ctx.helper.add(material.pre_tp, ctx.helper.round(material.m_tp, material.decimal.tp)) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.add(material.ex_pre_tp, ctx.helper.round(material.ex_tp, material.decimal.tp)) : null %></td>                                    </tr>                                    <!--<tr><td>材料价差费用(含材料税)</td>-->                                        <!--<td class="text-center"><%= material.material_tax ? (material.m_tax_tp !== null ? material.m_tax_tp : null) : '-' %></td>-->                                        <!--<td class="text-center"><%= material.material_tax ? (material.m_tax_tp !== null || material.m_tax_pre_tp !== null ? ctx.helper.add(material.m_tax_pre_tp, material.m_tax_tp) : null) : material.m_tax_pre_tp %></td>-->                                        <!--<td class="text-center">-</td>-->                                        <!--<td class="text-center">-</td>-->                                    <!--</tr>-->                                    <tr id="rate_set"><td>材料价差费用(含建筑税)</td>                                        <td class="text-center"><%= !material.material_tax ? (material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp) : null) : '-' %></td>                                        <td class="text-center"><%= !material.material_tax ? (material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp)) : null) : pre_tp_hs !== null ? pre_tp_hs : '-' %></td>                                        <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp) : null %></td>                                        <td class="text-center"><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp)) : null %></td>                                    </tr>                                </table>                            </div>                        </div>                    <% } %>                </div>            </div>            <div id="right-view" class="c-body" style="display:none;width: 33%">                <div class="resize-x" id="right-spr" r-Type="width" div1="#left-view" div2="#right-view" title="调整大小" a-type="percent"><!--调整左右高度条--></div>                <div class="tab-content" style="width: 100%">                    <div id="tiaochaje" class="tab-pane active">                        <div class="sjs-sh-1">                            <table class="table table-bordered">                                <thead>                                <tr><th>选择</th><th>需调整的价差</th><th>金额</th></tr>                                </thead>                                <tbody id="calc_basic_select">                                <% for (const bq of ex_calc) { %>                                    <tr>                                        <td><input type="checkbox" value="<%- bq.code %>" <% if (material.readOnly) { %>disabled<% } %> class="calc_select" <% if (bq.select) { %>checked<% } %>></td>                                        <td><%- materialType.ex_basic_text[bq.code] %></td><td><% if (bq.code === 'zdy' && !material.readOnly) { %><input type="number" id="calc_zdy" class="form-control form-control-sm" value="<%- bq.value %>"><% } else { %><%- bq.value %><% } %></td>                                    </tr>                                <% } %>                                </tbody>                            </table>                        </div>                    </div>                </div>            </div>        </div>        <div class="side-menu">            <!--右侧菜单-->            <ul class="nav flex-column right-nav">                <li class="nav-item">                    <a class="nav-link" content="#base-tab" href="javascript: void(0);">调差基数</a>                </li>            </ul>        </div>    </div></div><div style="display: none">    <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />    <img src="/public/images/icon-ok.png" id="icon-ok" /></div><script>    const readOnly = <%- material.readOnly %>;    const materialID = <%- material.id %>;    const materialTax = <%- material.material_tax %>;    const materialOrder = <%- material.order %>;    const editForAudit = <%- material.editForAudit %>;    const materialDecimal = JSON.parse(unescape('<%- escape(JSON.stringify(material.decimal)) %>'));    const decimal = JSON.parse('<%- JSON.stringify(ctx.tender.info.decimal) %>');    let m_tp = <%= material.m_tp !== null ? material.m_tp : 0 %>;    let ex_tp = <%= material.ex_tp !== null ? material.ex_tp : 0 %>;    const pre_tp = <%= material.pre_tp !== null ? material.pre_tp : 0 %>;    const ex_pre_tp = <%= material.ex_pre_tp !== null ? material.ex_pre_tp : 0 %>;    const pre_tp_hs = <%= pre_tp_hs !== null ? pre_tp_hs : 0 %>;    const ex_pre_tp_hs = <%= ex_pre_tp_hs !== null ? ex_pre_tp_hs : 0 %>;    const materialType = JSON.parse('<%- JSON.stringify(materialType) %>');    const ex_calc = JSON.parse('<%- JSON.stringify(ex_calc) %>');    let ex_expr = '<%- material.ex_expr %>';    let materialRate = parseInt('<%- material.exponent_rate %>');    let materialExponentData = JSON.parse(unescape('<%- escape(JSON.stringify(materialExponentData)) %>'));    const materialBillsData = JSON.parse(unescape('<%- escape(JSON.stringify(materialBillsData)) %>'));</script>
 |