| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <div class="modal" id="add-qi" data-backdrop="static" aria-modal="true" role="dialog">
- <div class="modal-dialog" role="document">
- <form class="modal-content" action="addStage" method="POST" onsubmit="return checkAddValid();">
- <div class="modal-header">
- <h5 class="modal-title">新建报审</h5>
- </div>
- <div class="modal-body">
- <div class="form-group form-group-sm">
- <label>期数</label>
- <input class="form-control form-control-sm" value="第 <%- (stages.length + 1) %> 期" type="text" readonly="">
- <input type="hidden" value="<%- (stages.length + 1) %>" name="stage_order">
- </div>
- <div class="form-group form-group-sm">
- <label>报审年月</label>
- <input class="datepicker-here form-control form-control-sm" autocomplete="off" name="date" placeholder="点击选择年月" data-view="months" data-min-view="months" data-date-format="yyyy-MM" data-language="zh" type="text">
- </div>
- </div>
- <div class="modal-footer">
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
- <input type="hidden" name="stage_type" value="<%- stage_type %>" />
- <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-sm btn-primary">确定</button>
- </div>
- </form>
- </div>
- </div>
- <!--审批流程/结果-->
- <div class="modal fade" id="sp-list" data-backdrop="static">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title">审批流程</h5>
- </div>
- <div class="modal-body">
- <div class="row">
- <div class="col-4 modal-height-500" style="overflow: auto">
- <div class="card mt-3">
- <ul class="list-group list-group-flush" id="auditor-list">
- </ul>
- </div>
- </div>
- <div class="col-8 modal-height-500" style="overflow: auto" id="audit-list">
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal" id="cost-ledger-col" data-backdrop="static" aria-modal="true" role="dialog">
- <div class="modal-dialog" role="document">
- <form class="modal-content" action="colSet" method="POST" onsubmit="return convertColSet();">
- <div class="modal-header">
- <h5 class="modal-title">列设置</h5>
- </div>
- <div class="modal-body">
- <div class="form-group form-check mb-0">
- <input type="checkbox" class="form-check-input group-checkbox" id="col_cur" <% if (colSet.cur) { %> checked <%} %>>
- <label class="form-check-label" for="col_cur">本期</label>
- </div>
- <div class="form-group form-check mb-0">
- <input type="checkbox" class="form-check-input group-checkbox" id="col_cur_excl_tax" <% if (colSet.cur_excl_tax) { %> checked <%} %>>
- <label class="form-check-label" for="col_cur_excl_tax">本期(不含税)</label>
- </div>
- <div class="form-group form-check mb-0">
- <input type="checkbox" class="form-check-input group-checkbox" id="col_end" <% if (colSet.end) { %> checked <%} %>>
- <label class="form-check-label" for="col_end">截止本期</label>
- </div>
- <div class="form-group form-check mb-0">
- <input type="checkbox" class="form-check-input group-checkbox" id="col_end_excl_tax" <% if (colSet.end_excl_tax) { %> checked <%} %>>
- <label class="form-check-label" for="col_end_excl_tax">截止本期(不含税)</label>
- </div>
- </div>
- <div class="modal-footer">
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
- <input type="hidden" name="col_cur" value="<%- colSet.cur %>" />
- <input type="hidden" name="col_cur_excl_tax" value="<%- colSet.cur_excl_tax %>" />
- <input type="hidden" name="col_end" value="<%- colSet.end %>" />
- <input type="hidden" name="col_end_excl_tax" value="<%- colSet.end_excl_tax %>" />
- <input type="hidden" name="stage_type" value="<%- stage_type %>" />
- <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
- <button type="submit" class="btn btn-sm btn-primary">确定</button>
- </div>
- </form>
- </div>
- </div>
- <script>
- $('.datepicker-here').datepicker({
- autoClose: true,
- });
- const checkAddValid = function() {
- if ($('[name=date]', '#add-qi').val() == '') {
- toastr.error('请选择报审年月');
- return false;
- }
- }
- const checkEditValid = function() {
- if ($('[name=date]', '#edit-qi').val() == '') {
- toastr.error('请选择报审年月');
- return false;
- }
- }
- const convertColSet = function() {
- const check = $('input[type=checkbox]', '#cost-ledger-col');
- for (const c of check) {
- const id = c.getAttribute('id');
- $(`input[name=${id}]`).val(c.checked ? 1 : 0);
- }
- return true;
- }
- </script>
|