فهرست منبع

表头冻结恢复

laiguoran 5 سال پیش
والد
کامیت
3fcf50a1a1

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

@@ -273,7 +273,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td style="width: 45%" 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 {
@@ -285,9 +285,9 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 创建人
-    html.push('<td class="text-center">', node.user_name ? node.user_name : '', '</td>');
+    html.push('<td style="width: 10%" class="text-center">', node.user_name ? node.user_name : '', '</td>');
     // 创建时间
-    html.push('<td>', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
+    html.push('<td style="width: 15%">', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
     // 计量模式
     // html.push('<td>');
     // if (node.measure_type) {
@@ -295,13 +295,13 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     // }
     // html.push('</td>');
     // 计量期数
-    html.push('<td  class="text-center">');
+    html.push('<td style="width: 10%" class="text-center">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
     }
     html.push('</td>');
     // 审批状态
-    html.push('<td>');
+    html.push('<td style="width: 20%">');
     html.push(node.lastStage ? auditConst.stage.statusString[node.lastStage.status] : auditConst.ledger.statusString[node.ledger_status]);
     html.push(node.status_users ? '(' + node.status_users + ')' : '');
     html.push('</td>');
@@ -318,7 +318,7 @@ function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th class="text-center" style="width: 45%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 10%">', '创建人', '</th>');
         html.push('<th class="text-center" style="width: 15%">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');

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

@@ -296,7 +296,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td style="width: 23%" 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 {
@@ -308,51 +308,51 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 计量模式
-    html.push('<td class="text-center">');
+    html.push('<td style="width: 7%" class="text-center">');
     if (node.measure_type) {
         html.push(node.measure_type === measureType.tz.value ? '0号台账' : '工程量清单');
     }
     html.push('</td>');
     // 计量期数
-    html.push('<td class="text-center">');
+    html.push('<td style="width: 7%" class="text-center">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
     }
     html.push('</td>');
     // 审批状态
-    html.push('<td>');
+    html.push('<td style="width: 7%">');
     html.push(node.lastStage ? auditConst.stage.statusString[node.lastStage.status] : auditConst.ledger.statusString[node.ledger_status]);
     html.push('</td>');
     // 0号台账合同
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.total_price);
     html.push('</td>');
     // 本期完成
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.gather_tp);
     html.push('</td>');
     // 截止本期合同
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_contract_tp);
     html.push('</td>');
     // 截止本期变更
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_qc_tp);
     html.push('</td>');
     // 截止本期完成
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_gather_tp);
     html.push('</td>');
     // 截止上期完成
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.pre_gather_tp);
     html.push('</td>');
     // 本期应付
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.yf_tp);
     html.push('</td>');
     // 截止本期应付
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_yf_tp);
     html.push('</td>');
     html.push('</tr>');
@@ -368,7 +368,7 @@ function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th class="text-center" style="width: 23%">', '标段名称', '</th>');
         html.push('<th class="text-center" style="width: 7%">', '计量模式', '</th>');
         html.push('<th class="text-center" style="width: 7%">', '计量期数', '</th>');

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

@@ -260,7 +260,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td style="width: 45%" 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 {
@@ -271,17 +271,17 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 创建人
-    html.push('<td class="text-center">', node.user_name, '</td>');
+    html.push('<td style="width: 10%" class="text-center">', node.user_name, '</td>');
     // 创建时间
-    html.push('<td>', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
+    html.push('<td style="width: 15%">', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
     // 完成期数
-    html.push('<td class="text-center">');
+    html.push('<td style="width: 10%" class="text-center">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '第0期');
     }
     html.push('</td>');
     // 管理
-    html.push('<td tid="' + node.id + '">');
+    html.push('<td style="width: 20%" tid="' + node.id + '">');
     if (!node.cid) {
         html.push('<a href="javascript: void(0)" name="edit" class="btn btn-outline-primary btn-sm">编辑</a>');
         if (node.lastStage === null || node.lastStage === undefined) {
@@ -302,7 +302,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
 function getTenderTreeHeaderHtml() {
     const html = [];
     html.push('<table class="table table-hover table-bordered">');
-    html.push('<thead>', '<tr>');
+    html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
     html.push('<th class="text-center" style="width: 45%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
     html.push('<th class="text-center" style="width: 10%">', '创建人', '</th>');
     html.push('<th class="text-center" style="width: 15%">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');

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

@@ -351,7 +351,7 @@ function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th style="width: 35%" class="text-center">', '标段名称', '</th>');
         html.push('<th style="width: 10%" class="text-center">', '计量期数', '</th>');
         html.push('<th style="width: 10%" class="text-center">', '总价 <i class="fa fa-question-circle text-primary"  data-placement="bottom" data-toggle="tooltip" data-original-title="0号台账+截止本期数量变更"></i>', '</th>');

+ 5 - 5
app/public/js/tender_showhide.js

@@ -54,11 +54,11 @@ function localHideList() {
 $(window).resize(setTopTr);
 // 设置表头固定并动态调整宽度高度
 function setTopTr() {
-    // 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:first").children('td').eq(item).outerWidth());
-    // }
-    //$('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
-    $('.c-body table').css('margin-top', -2);
+    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:first").children('td').eq(item).outerWidth());
+    }
+    $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
+    // $('.c-body table').css('margin-top', -2);
 }
 
 function doTrStatus(node, status, all = '') {