浏览代码

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

laiguoran 2 年之前
父节点
当前提交
eebcac9e4b

+ 6 - 1
app/const/tender_info.js

@@ -53,6 +53,11 @@ const defaultInfo = {
             corporation: '',
             date: '',
         },
+        audit: {
+            company: '',
+            corporation: '',
+            date: '',
+        }
     },
     // 技术参数
     tech_param: {
@@ -172,7 +177,7 @@ const defaultInfo = {
         same_code: true,
         sibling: true,
         over: true,
-        banMinusChangeBills: false,
+        banMinusChangeBills: true,
     },
     fun_rela: {
         hintOver: true,

+ 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]');
 });

+ 1 - 1
app/public/js/path_tree.js

@@ -417,7 +417,7 @@ const createNewPathTree = function (type, setting) {
                 }
                 parents.push(...this.getAllParents(node));
             }
-            this.sortByLevel(parents)
+            this.sortByLevelConverse(parents);
             for (const parent of parents) {
                 if (!parent.children || parent.children.length === 0) continue;
                 parent.filter = !parent.children.find(x => { return !x.filter });

+ 4 - 0
app/public/js/revise_price.js

@@ -78,6 +78,7 @@ $(document).ready(() => {
         defaultRowHeight: 21,
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
+        selectedBackColor: '#fffacd',
         readOnly,
         getColor: function (sheet, data, row, col, defaultColor) {
             if (!data) return defaultColor;
@@ -198,6 +199,9 @@ $(document).ready(() => {
                 }
                 this.tree.loadFilter(invalid.join(','), 'filter');
             }
+            console.log(this.tree.nodes.find(x => { return x.code === '1'}));
+            console.log(this.tree.nodes.find(x => { return x.code === '1-2'}));
+            console.log(this.tree.nodes.find(x => { return x.code === '1-2-2'}));
         }
         refreshChangeRela(price, samePrice) {
             if (!samePrice) samePrice = this.getSamePrice(price);

+ 4 - 4
app/public/js/tender_list_info.js

@@ -24,13 +24,13 @@ const tenderListSpec = (function(){
         }
         html.push('</td>');
         // 计量模式
-        html.push('<td style="width: 75px" class="text-center">');
+        html.push('<td style="width: 85px" class="text-center">');
         if (node.measure_type) {
             html.push(node.measure_type === measureType.tz.value ? '0号台账' : '工程量清单');
         }
         html.push('</td>');
         // 计量进度
-        html.push('<td style="width: 105px">');
+        html.push('<td style="width: 125px">');
         if (!node.cid && node.cur_flow) {
             if (node.progress) {
                 html.push(node.progress.title + ' (' + '<span class="' + node.progress.status_class +'">' + node.progress.status + '</span>' + ')');
@@ -114,8 +114,8 @@ const tenderListSpec = (function(){
         html.push('<table class="table table-hover table-bordered">');
         html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th class="text-center" style="min-width: 300px;">', '标段名称', '</th>');
-        html.push('<th class="text-center" style="width: 75px">', '计量模式', '</th>');
-        html.push('<th class="text-center" style="width: 105px">', '计量进度', '</th>');
+        html.push('<th class="text-center" style="width: 85px">', '计量模式', '</th>');
+        html.push('<th class="text-center" style="width: 125px">', '计量进度', '</th>');
         html.push('<th class="text-center" style="width: 230px">', '当前流程', '</th>');
         // html.push('<th class="text-center" style="width: 7%">', '上一流程审批时间', '</th>');
         html.push('<th class="text-center" style="width: 100px">', '签约合同价', '</th>');

+ 2 - 2
app/public/js/tender_list_progress.js

@@ -29,7 +29,7 @@ const tenderListSpec = (function(){
         const html = [];
         html.push('<tr pid="' + pid + '">');
         // 名称
-        html.push('<td width="20%" class="in-' + node.level + '">');
+        html.push('<td width="25%" class="in-' + node.level + '">');
         if (node.cid) {
             html.push('<span onselectstart="return false" style="{-moz-user-select:none}" class="fold-switch mr-1" title="收起" cid="'+ node.sort_id +'"><i class="fa fa-minus-square-o"></i></span> <i class="fa fa-folder-o"></i> ', node.name);
         } else {
@@ -51,7 +51,7 @@ const tenderListSpec = (function(){
         }
         html.push('</td>');
         // 当前流程
-        html.push('<td style="width: 13%">');
+        html.push('<td style="width: 8%">');
         if (!node.cid && node.cur_flow) {
             if (node.stage_status !== undefined) {
                 const curUser = node.cur_flow.name + (node.cur_flow.role ? '-'+node.cur_flow.role  : '');

+ 1 - 1
app/service/project.js

@@ -11,7 +11,7 @@ const imType = require('../const/tender').imType;
 const defaultFunRela = {
     banOver: true,
     hintOver: true,
-    banMinusChangeBills: false,
+    banMinusChangeBills: true,
     minusNoValue: true,
     lockPayExpr: false,
     imType: imType.zl.value,

+ 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>

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

@@ -41,7 +41,7 @@
                             <div class="p-2"><a href="javascript: void(0);" id="batch-del-filing" class="text-danger">批量删除</a></div>
                             <div class="p-2"><a href="javascript: void(0);" id="sync-filing">同步授权至其他类别</a></div>
                         </div>
-                        <div class="modal-height-400">
+                        <div class="modal-height-400 scroll-y">
                             <table class="table table-bordered">
                                 <thead>
                                 <tr><th>选择</th><th>用户名</th><th>授权时间</th><th>权限</th><th>操作</th></tr>
@@ -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(),