فهرست منبع

1. 跟踪审计单位
2. 资料归集,显示至

MaiXinRong 2 سال پیش
والد
کامیت
6d612c8c10
5فایلهای تغییر یافته به همراه93 افزوده شده و 5 حذف شده
  1. 5 0
      app/const/tender_info.js
  2. 39 4
      app/public/js/file_detail.js
  3. 10 0
      app/view/file/file.ejs
  4. 1 1
      app/view/file/file_modal.ejs
  5. 38 0
      app/view/tender/detail_modal.ejs

+ 5 - 0
app/const/tender_info.js

@@ -53,6 +53,11 @@ const defaultInfo = {
             corporation: '',
             date: '',
         },
+        audit: {
+            company: '',
+            corporation: '',
+            date: '',
+        }
     },
     // 技术参数
     tech_param: {

+ 39 - 4
app/public/js/file_detail.js

@@ -1,7 +1,5 @@
 $(document).ready(function() {
     autoFlashHeight();
-    console.log($(".sjs-height-0").height());
-    console.log($('#add-slibing').parent().parent().height());
     $('#filing').height($(".sjs-height-0").height() - $('#add-slibing').parent().parent().height() - 10);
     class FilingObj {
         constructor(setting) {
@@ -182,8 +180,8 @@ $(document).ready(function() {
                     toastr.error('未选择上传文件。');
                     return false;
                 }
-                if (file.size > 30 * 1024 * 1024) {
-                    toastr.error('上传文件大小超过30MB。');
+                if (file.size > 50 * 1024 * 1024) {
+                    toastr.error('上传文件大小超过50MB。');
                     return false;
                 }
                 const fileext = '.' + file.name.toLowerCase().split('.').splice(-1)[0];
@@ -292,6 +290,21 @@ $(document).ready(function() {
             }
             setLocalCache(this.expandKey, this.expandCache.join(','));
         }
+        expandByLevel(level) {
+            this.expandByCustom(x => {
+                return x.level + 1 < level;
+            })
+        }
+        expandByCustom(fun) {
+            this.expandCache = [];
+            const nodes = this.filingTree.getNodes();
+            for (const node of nodes) {
+                const expand = fun(node);
+                if (expand) this.expandCache.push(node.id);
+                this.filingTree.expandNode(node, expand, false, false);
+            }
+            setLocalCache(this.expandKey, this.expandCache.join(','));
+        }
         moveFiling(node, tree_order) {
             if (tree_order === node.source_node.tree_order) return;
 
@@ -986,4 +999,26 @@ $(document).ready(function() {
         modal: '#filing-permission',
         list: '#filing-valid',
     });
+
+    // 显示层次
+    (function (select) {
+        $(select).click(function () {
+            const tag = $(this).attr('tag');
+            setTimeout(() => {
+                showWaitingView();
+                switch (tag) {
+                    case "1":
+                    case "2":
+                    case "3":
+                    case "4":
+                        filingObj.expandByLevel(parseInt(tag));
+                        break;
+                    case "last":
+                        filingObj.expandByCustom(() => { return true; });
+                        break;
+                }
+                closeWaitingView();
+            }, 100);
+        });
+    })('a[name=showLevel]');
 });

+ 10 - 0
app/view/file/file.ejs

@@ -14,6 +14,16 @@
             <div class="sjs-height-0 row">
                 <div class="col-3">
                     <div class="d-flex flex-row">
+                        <div class="btn-group">
+                            <button type="button" class="btn btn-sm  text-primary dropdown-toggle" data-toggle="dropdown" id="zhankai" aria-expanded="false">显示层级</button>
+                            <div class="dropdown-menu" aria-labelledby="zhankai" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 21px, 0px); top: 0px; left: 0px; will-change: transform;">
+                                <a class="dropdown-item" name="showLevel" tag="1" href="javascript: void(0);">第一层</a>
+                                <a class="dropdown-item" name="showLevel" tag="2" href="javascript: void(0);">第二层</a>
+                                <a class="dropdown-item" name="showLevel" tag="3" href="javascript: void(0);">第三层</a>
+                                <a class="dropdown-item" name="showLevel" tag="4" href="javascript: void(0);">第四层</a>
+                                <a class="dropdown-item" name="showLevel" tag="last" href="javascript: void(0);">最底层</a>
+                            </div>
+                        </div>
                         <% if (canFiling) { %>
                         <div class="p-2"><a href="javascript: void(0);" id="add-slibing">添加同级</a></div>
                         <div class="p-2"><a href="javascript: void(0);" id="add-child">添加子级</a></div>

+ 1 - 1
app/view/file/file_modal.ejs

@@ -112,7 +112,7 @@
                         <div class="d-flex justify-content-center bg-graye">
                             <div class="p-2">标段列表</div>
                         </div>
-                        <div class="modal-height-400">
+                        <div class="modal-height-400 scroll-y">
                             <ul id="rela-tender" class="ztree"></ul>
                         </div>
                     </div>

+ 38 - 0
app/view/tender/detail_modal.ejs

@@ -266,6 +266,35 @@
                                     </div>
                                 </div>
                             </div>
+                            <div class="form-group">
+                                <label>跟踪审计单位:</label>
+                                <div class="row">
+                                    <div class="col-12 mb-2">
+                                        <div class="input-group input-group-sm">
+                                            <div class="input-group-prepend">
+                                                <span class="input-group-text">单位名称</span>
+                                            </div>
+                                            <input type="text" class="form-control" value="" id="audit-company" maxlength="100" oninput="limitReturn(this)">
+                                        </div>
+                                    </div>
+                                    <div class="col-6 pr-0">
+                                        <div class="input-group input-group-sm">
+                                            <div class="input-group-prepend">
+                                                <span class="input-group-text">法人代表</span>
+                                            </div>
+                                            <input type="text" class="form-control" value="" id="audit-corporation" maxlength="100" oninput="limitReturn(this)">
+                                        </div>
+                                    </div>
+                                    <div class="col-6">
+                                        <div class="input-group input-group-sm">
+                                            <div class="input-group-prepend">
+                                                <span class="input-group-text">签订日期</span>
+                                            </div>
+                                            <input type="date" class="form-control" value="" id="audit-date">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
                         </div>
                         <div class="tab-pane" id="jscs">
                             <div class="form-group">
@@ -964,6 +993,10 @@
         $('#detect-company').val(property.construction_unit.detect.company);
         $('#detect-corporation').val(property.construction_unit.detect.corporation);
         $('#detect-date').val(property.construction_unit.detect.date);
+        // 检测单位
+        $('#audit-company').val(property.construction_unit.audit.company);
+        $('#audit-corporation').val(property.construction_unit.audit.corporation);
+        $('#audit-date').val(property.construction_unit.audit.date);
 
         // 技术参数
         $('#load-level').find("option:contains('" + property.tech_param.loadLevel + "')").attr("selected",true);
@@ -1031,6 +1064,11 @@
                     corporation: $('#detect-corporation').val(),
                     date: $('#detect-date').val(),
                 },
+                audit: {
+                    company: $('#audit-company').val(),
+                    corporation: $('#audit-corporation').val(),
+                    date: $('#audit-date').val(),
+                },
             },
             tech_param: {
                 loadLevel: $('#load-level').find("option:selected").text(),