Selaa lähdekoodia

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

MaiXinRong 4 vuotta sitten
vanhempi
commit
a3365826da

+ 9 - 5
app/public/js/change_set.js

@@ -362,6 +362,7 @@ $(document).ready(() => {
 
     // 打开签约清单modal并删除之前的操作
     $('#open-list-modal').click(function () {
+        autoFlashHeight()
         // tableDataRemake(changeListData);
     });
 
@@ -372,7 +373,7 @@ $(document).ready(() => {
         const isCheck = $(this).hasClass('table-success') ? true : false;
         const data_bwmx = $(this).attr('data-bwmx').split('$#$');
         const isDeal = $(this).data('gcl') !== undefined ? true : false;
-        let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="4" class="colspan_1">&nbsp;</td><td class="colspan_2"><input type="checkbox"></td></tr>';
+        let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="7" class="colspan_1">&nbsp;</td><td class="colspan_2"><input type="checkbox"></td></tr>';
         if (isDeal) {
             const lid = $(this).data('lid');
             let gcl = _.find(gclGatherData, function (item) {
@@ -385,16 +386,19 @@ $(document).ready(() => {
             for (const leaf of gcl.leafXmjs) {
                 const quantity = leaf.quantity !== undefined && leaf.quantity !== null ? leaf.quantity : 0;
                 const bwmx = leaf.bwmx !== undefined ? leaf.bwmx : '';
-                const isChecked = data_bwmx.indexOf(leaf.code + '_' + bwmx + ';' + quantity) !== -1 && isCheck ? 'checked' : '';
+                const isChecked = data_bwmx.indexOf(leaf.code + '_' + (bwmx !== '' ? bwmx : leaf.jldy !== '' ? leaf.jldy : '') + ';' + quantity) !== -1 && isCheck ? 'checked' : '';
                 codeHtml += '<tr quantity="' + quantity + '"><td>' + leaf.code + '</td>' +
                     '<td>' + leaf.jldy + '</td>' +
                     '<td>' + bwmx + '</td>' +
+                    '<td>' + leaf.dwgc + '</td>' +
+                    '<td>' + leaf.fbgc + '</td>' +
+                    '<td>' + leaf.fxgc + '</td>' +
                     '<td>' + roundnum(quantity, findDecimal(gcl.unit)) + '</td>' +
                     '<td><input type="checkbox"' + isChecked +
                     '></td></tr>';
             }
         } else if (!isDeal && isCheck) {
-            codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="4" class="colspan_1">&nbsp;</td><td class="colspan_2"><input type="checkbox" checked></td></tr>';
+            codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="7" class="colspan_1">&nbsp;</td><td class="colspan_2"><input type="checkbox" checked></td></tr>';
         }
         $('#code-list').attr('data-index', $(this).children('td').eq(0).text());
         $('#code-list').html(codeHtml);
@@ -414,7 +418,7 @@ $(document).ready(() => {
             $('#code-list input:checked').each(function () {
                 const tr = $(this).parents('tr');
                 const length = tr.children('td').length;
-                const bwmx = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
+                const bwmx = length === 8 ? tr.children('td').eq(0).text() + '_' + (tr.children('td').eq(2).text() !== '' ? tr.children('td').eq(2).text() : tr.children('td').eq(1).text()) : '0';
                 const quantity = tr.attr('quantity');
                 const de_qu = bwmx + ';' + quantity;
                 data_bwmx.push(de_qu);
@@ -429,7 +433,7 @@ $(document).ready(() => {
                 $('#code-list input:checked').each(function () {
                     const tr = $(this).parents('tr');
                     const length = tr.children('td').length;
-                    const bwmx = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
+                    const bwmx = length === 8 ? tr.children('td').eq(0).text() + '_' + (tr.children('td').eq(2).text() !== '' ? tr.children('td').eq(2).text() : tr.children('td').eq(1).text()) : '0';
                     const quantity = tr.attr('quantity');
                     const de_qu = bwmx + ';' + quantity;
                     data_bwmx.push(de_qu);

+ 3 - 1
app/public/js/global.js

@@ -34,6 +34,8 @@ function autoFlashHeight(){
     for (const sh of $('.sjs-sh')) {
         $(sh).height($(window).height()-cHeader-getObjHeight($('.sjs-bar', sh.parentNode))-92+55);
     }
+    /*工程变更添加清单高度*/
+    $(".sjs-biangeng-height").height($(window).height()/3.3);
 };
 $(window).resize(autoFlashHeight);
 /*全局自适应高度结束*/
@@ -904,4 +906,4 @@ Number.prototype.format2Str = function (pattern) {
         }
     }
     return retstr.replace(/^,+/,'').replace(/\.$/,'');
-};
+};

+ 9 - 92
app/view/change/info_modal.ejs

@@ -98,92 +98,7 @@
 
 <!--添加清单-->
 <div class="modal fade " tabindex="-1" role="dialog" aria-hidden="true" id="addlist" data-backdrop="static">
-    <style>
-        /* 设置滚动条的样式 */
-        .fixed_headers ::-webkit-scrollbar, .fixed_headers2 ::-webkit-scrollbar {
-            width:5px;
-        }
-        .fixed_headers thead tr, .fixed_headers2 thead tr {
-            display: block;
-            position: relative;
-            overflow-y: scroll;
-        }
-        .fixed_headers tbody, .fixed_headers2 tbody {
-            display: block;
-            overflow-y: scroll;
-            height: 369px;
-        }
-        .fixed_headers td:nth-child(1),
-        .fixed_headers th:nth-child(1) {
-            width: 6%;
-            min-width: 40px;
-            text-overflow:ellipsis;
-            white-space:nowrap;
-            overflow:hidden;
-        }
-        .fixed_headers td:nth-child(2),
-        .fixed_headers th:nth-child(2) {
-            width: 20%;
-            min-width: 133px;
-        }
-        .fixed_headers td:nth-child(3),
-        .fixed_headers th:nth-child(3) {
-            width: 37%;
-            min-width: 247px;
-        }
-        .fixed_headers td:nth-child(4),
-        .fixed_headers th:nth-child(4) {
-            width: 10%;
-            min-width: 66px;
-        }
-        .fixed_headers td:nth-child(5),
-        .fixed_headers th:nth-child(5) {
-            width: 13%;
-            min-width: 86px;
-        }
-        .fixed_headers td:nth-child(6),
-        .fixed_headers th:nth-child(6) {
-            width: 13%;
-            min-width: 87px;
-        }
-
-        .fixed_headers2 td:nth-child(1),
-        .fixed_headers2 th:nth-child(1) {
-            width: 18%;
-            min-width: 100px;
-            text-overflow:ellipsis;
-            white-space:nowrap;
-            overflow:hidden;
-        }
-        .fixed_headers2 td:nth-child(2),
-        .fixed_headers2 th:nth-child(2) {
-            width: 23%;
-            min-width: 113px;
-        }
-        .fixed_headers2 td:nth-child(3),
-        .fixed_headers2 th:nth-child(3) {
-            width: 25%;
-            min-width: 124px;
-        }
-        .fixed_headers2 td:nth-child(4),
-        .fixed_headers2 th:nth-child(4) {
-            width: 16%;
-            min-width: 82px;
-        }
-        .fixed_headers2 td:nth-child(5),
-        .fixed_headers2 th:nth-child(5) {
-            width: 8%;
-            min-width: 41px;
-        }
-        .fixed_headers2 .colspan_1 {
-            width: 95%!important;
-        }
-        .fixed_headers2 .colspan_2 {
-            width: 5%!important;
-            min-width: 41px!important;
-        }
-    </style>
-    <div class="modal-dialog modal-xl">
+    <div class="modal-dialog modal-lg">
         <div class="modal-content">
             <div class="modal-header">
                 <h5 class="modal-title" id="mySmallModalLabel">从清单中选择</h5>
@@ -193,20 +108,22 @@
             </div>
             <div class="modal-body">
                 <div class="row">
-                    <div class="col-7">
-                        <div style="height:400px;overflow-y:hidden">
+                    <div class="col-12">
+                        <div class="mb-2 col-6 p-0 search-group"><input class="form-control form-control-sm" placeholder="输入 清单编号、名称 检索" value="202-1-1"><a href="" class="text-danger remove-btn" title="移除关键词"><i class="fa fa-times-circle "></i></a></div>
+                        <div style="overflow-y:auto" class="sjs-biangeng-height">
                             <table class="table table-striped table-bordered table-hover table-sm fixed_headers">
-                                <thead><tr><th>序号</th><th>清单编号</th><th>名称</th><th>单位</th><th>单价</th><th>数量</th></tr></thead>
+                                <thead><tr><th width="40">序号</th><th>清单编号</th><th>名称</th><th width="50">单位</th><th width="100">单价</th><th width="100">数量</th></tr></thead>
                                 <tbody id="table-list-select">
                                 </tbody>
                             </table>
                         </div>
                     </div>
-                    <div class="col-5">
-                        <div style="height:400px;overflow-y:hidden">
+                    <div class="col-12">
+                        <div class="mb-2 col-6 p-0 search-group"><input class="form-control form-control-sm" placeholder="输入 项目节编号、名称、计量单元 检索"><!-- <a href="" class="text-danger remove-btn" title="移除关键词"><i class="fa fa-times-circle "></i></a> --></div>
+                        <div style="overflow-y:auto" class="sjs-biangeng-height">
                             <table class="table table-striped table-bordered table-hover table-sm fixed_headers2">
                                 <thead>
-                                <tr><th>项目节编号</th><th>名称</th><th>计量单元</th><th>数量</th><th>选择</th></tr>
+                                <tr><th width="100">项目节编号</th><th>名称</th><th>计量单元</th><th>单位工程</th><th>分部工程</th><th>分项工程</th><th width="70">数量</th><th width="40">选择</th></tr>
                                 </thead>
                                 <tbody id="code-list" data-index="">
                                 </tbody>

+ 1 - 1
app/view/dashboard/index.ejs

@@ -232,7 +232,7 @@
                                                     <div class="col-auto"><span class="badge badge-secondary">材料调差</span></div>
                                                     <div class="col-6">
                                                         <a href="/tender/<%- nm.tid %>"><%- nm.name %></a>
-                                                        <a href="/tender/<%- nm.tid %>/measure/stage/<%- nm.m_order %>">第<%- nm.m_order %>期 </a>
+                                                        <a href="/tender/<%- nm.tid %>/measure/material/<%- nm.m_order %>">第<%- nm.m_order %>期 </a>
                                                         <%- acMaterial.statusString[nm.status]%>
                                                     </div>
                                                 </div>