Selaa lähdekoodia

标段管理列表表头固定

laiguoran 5 vuotta sitten
vanhempi
commit
f5f4e2ee36

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

@@ -317,8 +317,8 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
 function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
-        html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<table class="table table-hover table-bordered" style="margin-top: 25px">');
+        html.push('<thead style="position: fixed;left:56px;top: 34px">', '<tr>');
         html.push('<th>', '标段名称', '</th>');
         html.push('<th>', '创建人', '</th>');
         html.push('<th>', '创建时间', '</th>');

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

@@ -342,8 +342,8 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
 function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
-        html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<table class="table table-hover table-bordered" style="margin-top: 25px">');
+        html.push('<thead style="position: fixed;left:56px;top: 34px">', '<tr>');
         html.push('<th>', '名称', '</th>');
         html.push('<th>', '计量模式', '</th>');
         html.push('<th>', '计量期数', '</th>');

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

@@ -301,7 +301,8 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
 }
 function getTenderTreeHeaderHtml() {
     const html = [];
-    html.push('<thead>', '<tr>');
+    html.push('<table class="table table-hover table-bordered" style="margin-top: 25px">');
+    html.push('<thead style="position: fixed;left:56px;top: 34px">', '<tr>');
     html.push('<th>', '名称', '</th>');
     html.push('<th>', '创建人', '</th>');
     html.push('<th>', '创建时间', '</th>');
@@ -314,7 +315,6 @@ function getTenderTreeHeaderHtml() {
 function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
-        html.push('<table class="table table-hover table-bordered">');
         html.push(getTenderTreeHeaderHtml());
         parentId = 0;
         for (const t of tenderTree) {

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

@@ -286,7 +286,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td width="40%" class="in-' + node.level + '">');
     if (node.cid) {
         html.push('<span 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 {
@@ -298,13 +298,13 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 计量期数
-    html.push('<td>');
+    html.push('<td width="120">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
     }
     html.push('</td>');
     // 累计合同计量
-    html.push('<td>');
+    html.push('<td width="15%">');
     const sum = node.lastStage ? ZhCalc.add(node.total_price, node.lastStage.end_qc_tp) : node.total_price;
     html.push(node.sum_tp ? node.sum_tp : '');
     html.push('</td>');
@@ -328,11 +328,11 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
 function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
-        html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
-        html.push('<th>', '名称', '</th>');
+        html.push('<table class="table table-hover table-bordered" style="margin-top: 25px">');
+        html.push('<thead style="position: fixed;left:56px;top: 34px">', '<tr>');;
+        html.push('<th width="60%">', '名称', '</th>');
         html.push('<th width="120">', '计量期数', '</th>');
-        html.push('<th>', '总价 <i class="fa fa-question-circle text-primary"  data-placement="bottom" data-toggle="tooltip" data-original-title="0号台账+截止本期数量变更"></i>', '</th>');
+        html.push('<th width="10%">', '总价 <i class="fa fa-question-circle text-primary"  data-placement="bottom" data-toggle="tooltip" data-original-title="0号台账+截止本期数量变更"></i>', '</th>');
         html.push('<th>', '截止上期完成/本期完成/未完成', '</th>');
         html.push('</tr>', '</thead>');
         parentId = 0;

+ 4 - 1
app/public/js/tender_showhide.js

@@ -32,7 +32,6 @@ function removeValueToCate(cate) {
 
 function localHideList() {
     const pro_cate = getLocalCache('pro_'+ pid + '_category_list');
-    console.log(category);
     const cate = JSON.stringify(removeValueToCate(category));
     if (pro_cate && cate === pro_cate) {
         const userTenderHideList = getLocalCache(uphlname);
@@ -50,6 +49,10 @@ function localHideList() {
         removeLocalCache(uphlname);
         setLocalCache('pro_'+ pid + '_category_list', cate);
     }
+    for(let item = 0; item < $(".c-body table>thead>tr>th").length; item ++) {
+        $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:last").children('td').eq(item).outerWidth());
+    }
+    $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
 }
 
 function doTrStatus(node, status, all = '') {