| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 | <% include ./sub_menu.ejs %><div class="panel-content">    <div class="panel-title">        <div class="title-main">            <h2>功能设置</h2>        </div>    </div>    <div class="content-wrap">        <div class="c-body">            <div class="sjs-height-0">                <div class="row m-0 mt-3">                    <div class="col-6">                        <div class="card mb-3">                            <div class="card-body">                                <h5 class="card-title">超计控制</h5>                                <div class="form-group mb-4">                                    <div>                                        <div class="form-check form-check-inline">                                            <input class="form-check-input" type="checkbox" id="ban_over" name="ban_over" <% if (funRela.banOver) { %>checked<% } %> onchange="updateSetting();">                                            <label class="form-check-label" for="ban_over">超计时限制上报审批/审批通过</label>                                        </div>                                        <div class="form-check form-check-inline">                                            <input class="form-check-input" type="checkbox" id="hint_over" name="hint_over" <% if (funRela.hintOver) { %>checked<% } %> onchange="updateSetting();">                                            <label class="form-check-label" for="hint_over">超计时标红显示</label>                                        </div>                                    </div>                                </div>                            </div>                        </div>                        <div class="card mb-3">                            <div class="card-body">                                <h5 class="card-title">负变更</h5>                                <div class="form-group mb-4">                                    <div>                                        <div class="form-check form-check-inline">                                            <input class="form-check-input" type="checkbox" id="minusNoValue" name="minusNoValue" <% if (funRela.minusNoValue) { %>checked<% } %> onchange="updateSetting();">                                            <label class="form-check-label" for="minusNoValue">计量不计价</label>                                        </div>                                    </div>                                </div>                            </div>                        </div>                        <div class="card mb-3">                            <div class="card-body">                                <h5 class="card-title">中间计量模式设置</h5>                                <div class="form-group mb-4">                                    <div>                                        <% for (const i in imType) { %>                                            <div class="form-check form-check-inline">                                                <input class="form-check-input" type="radio" id="radio_<%- i %>" value="<%- imType[i].value %>" <% if (funRela.imType === imType[i].value) { %>checked<% } %> name="im_type" onchange="updateSetting();">                                                <label class="form-check-label" for="radio_<%- i %>" name="im_type"><%- imType[i].name %></label>                                            </div>                                        <% } %>                                    </div>                                    <div class="mt-3">                                        <label class="form-text alert alert-danger">切换模式,仅对未开始第一期计量的标段生效。</label>                                    </div>                                </div>                            </div>                        </div>                        <div class="row">                            <div class="col-6">                                <div class="card mb-3">                                    <div class="card-body">                                        <h5 class="card-title">工程变更</h5>                                        <div class="form-group mb-1">                                            <div class="form-check form-check-inline">                                                <input class="form-check-input" type="checkbox" id="openChangeProject" <% if(ctx.session.sessionProject.page_show.openChangeProject) { %>checked<% } %> onchange="updateSetting(1);">                                                <label class="form-check-label" for="openChangeProject">显示「变更立项」页面</label>                                            </div>                                        </div>                                        <div class="form-group mb-1">                                            <div class="form-check form-check-inline">                                                <input class="form-check-input" type="checkbox" id="openChangeApply" <% if(ctx.session.sessionProject.page_show.openChangeApply) { %>checked<% } %> onchange="updateSetting(2);">                                                <label class="form-check-label" for="openChangeApply">显示「变更申请」页面</label>                                            </div>                                        </div>                                        <div class="form-group mb-1">                                            <div class="form-check form-check-inline">                                                <input class="form-check-input" type="checkbox" id="openChangePlan" <% if(ctx.session.sessionProject.page_show.openChangePlan) { %>checked<% } %> onchange="updateSetting(3);">                                                <label class="form-check-label" for="openChangePlan">显示「变更方案」页面</label>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                            <div class="col-6">                                <div class="card mb-3">                                    <div class="card-body">                                        <h5 class="card-title">材料调差</h5>                                        <div class="form-group mb-1">                                            <div class="form-check form-check-inline">                                                <input class="form-check-input" type="checkbox" id="openMaterialTax" <% if(ctx.session.sessionProject.page_show.openMaterialTax) { %>checked<% } %> onchange="updateSetting();">                                                <label class="form-check-label" for="openMaterialTax">使用材料税</label>                                            </div>                                        </div>                                        <div class="form-group mb-1">                                            <div class="form-check form-check-inline">                                                <input class="form-check-input" type="checkbox" id="openMaterialChecklist" <% if(ctx.session.sessionProject.page_show.openMaterialChecklist) { %>checked<% } %> onchange="updateSetting();">                                                <label class="form-check-label" for="openMaterialChecklist">开启「批量设置调差清单」添加调差工料功能</label>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                        </div>                        <div class="card mb-3">                            <div class="card-body">                                <h5 class="card-title">动态决算</h5>                                <div class="form-group mb-4">                                    <div>                                        <div class="form-check form-check-inline">                                            <input class="form-check-input" type="checkbox" id="need_gcl" name="need_gcl" <% if (funRela.needGcl) { %>checked<% } %> onchange="updateSetting();">                                            <label class="form-check-label" for="need_gcl">显示清单信息</label>                                        </div>                                    </div>                                    <div class="mt-3">                                        <label class="form-text alert alert-danger">做施工图三级清单预算时,请进行勾选。</label>                                    </div>                                </div>                            </div>                        </div>                    </div>                </div>            </div>        </div>    </div></div><script src="/public/js/setting.js"></script><script>    $(() => {        autoFlashHeight();    });    const updateSetting = function (tab = false) {        if (!$('#openChangeApply')[0].checked && $('#openChangeProject')[0].checked && tab === 1) {            $('#openChangeApply').prop('checked', true);            $('#openChangePlan').prop('checked', true);        } else if (!$('#openChangeApply')[0].checked && $('#openChangeProject')[0].checked && tab === 2) {            $('#openChangeProject').prop('checked', false);        }        if (!$('#openChangePlan')[0].checked && $('#openChangeApply')[0].checked && tab === 2) {            $('#openChangePlan').prop('checked', true);        } else if (!$('#openChangePlan')[0].checked && $('#openChangeApply')[0].checked && tab === 3) {            $('#openChangeApply').prop('checked', false);            $('#openChangeProject').prop('checked', false);        }        postData('/setting/fun/update', {            imType: parseInt($('[name=im_type]:checked').val()),            banOver: $('[name=ban_over]')[0].checked,            hintOver: $('#hint_over')[0].checked,            minusNoValue: $('[name=minusNoValue]')[0].checked,            needGcl: $('#need_gcl')[0].checked,            openChangeProject: $('#openChangeProject')[0].checked,            openChangeApply: $('#openChangeApply')[0].checked,            openChangePlan: $('#openChangePlan')[0].checked,            openMaterialTax: $('#openMaterialTax')[0].checked,            openMaterialChecklist: $('#openMaterialChecklist')[0].checked,        });    }</script>
 |