From 959d6f5d59d38f096b0d6fa454936015cfa80d71 Mon Sep 17 00:00:00 2001
From: LiJinHuan <lijinhuan@prec-tech.com>
Date: 星期三, 31 五月 2023 16:49:00 +0800
Subject: [PATCH] 备品页面框架

---
 force-app/main/default/components/RelationListPagingCmp.component |   53 ++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 38 insertions(+), 15 deletions(-)

diff --git a/force-app/main/default/components/RelationListPagingCmp.component b/force-app/main/default/components/RelationListPagingCmp.component
index b37cf06..b7945a1 100644
--- a/force-app/main/default/components/RelationListPagingCmp.component
+++ b/force-app/main/default/components/RelationListPagingCmp.component
@@ -160,7 +160,7 @@
                             <apex:repeat value="{!titleRight}" var="t">
                                 <!-- 20230511 ljh lightning start -->
                                 <!-- <td class="col_{!columnRightCss[cnt]} "> -->
-                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="test(this);return false;">
+                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="ToggleWidth(this);return false;">
                                 <!-- 20230511 ljh lightning end -->
                                     <apex:outputPanel layout="none" rendered="{!Not(noSortHeader)}">
                                       <a href="#" name="out_Div_a" onclick="sortTableJs('{!cnt + titleLeft.size}');return false;" style="text-decoration: underline;">
@@ -187,7 +187,7 @@
                     <!--銆�宸� 銉囥兗銈裤儶銈广儓 -->
                     <div id="in_Div_L">
                         <!-- 20230512 ljh lightning add table-layout:fixed" -->
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed" border="" id="tableData_L">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData_L">
 <apex:variable value="{!1}" var="cnt" />
 <apex:repeat value="{!pageController.viewList}" var="or" id="oppTable_L">
                             <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
@@ -374,28 +374,51 @@
     }
     // 20230523  ljh lightning start 
     if(i == 0){
+        i++;
         tableWidth = j$('body .pbBody table#tableHeader').width();
+        // var widthTemp = 0;
         j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
             var colClass = getColClassName(this);
             if (colClass != 'col_Scroll') {
-                listColClassWidthMap[colClass] = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
+                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
+                listColClassWidthMap[colClass] = temp;
+                //widthTemp += temp;
             }
         });
-        i++;
+        var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width();
+        // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth);
+        var tableHeader_L =  j$(escapeVfId('tableHeader_L')).width();
+        j$('div#in_Div_L').css('width', tableHeader_L+ 'px'); 
+        j$('table#tableData_L').css('width', tableHeader_L + 'px');
+        // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+        if(tableWidth > blockWidthNew){
+            j$('div#in_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh 
+            j$('div#out_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
+        }
+        j$('div#in_Div').scroll(function() {
+            j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
+            j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
+        });
+        j$('div#out_Div').scroll(function() {
+            j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
+        });
+        j$('div#in_Div_L').scroll(function() {
+            j$('div#in_Div').scrollTop(j$(this).scrollTop());
+        });
+       
     }
     // windowResize();
-    
     // 銈广偗銉兗銉�e嫊
-    j$('div#in_Div').scroll(function() {
-        j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
-        j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
-    });
-    j$('div#out_Div').scroll(function() {
-        j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
-    });
-    j$('div#in_Div_L').scroll(function() {
-        j$('div#in_Div').scrollTop(j$(this).scrollTop());
-    });
+    // j$('div#in_Div').scroll(function() {
+    //     j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
+    //     j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
+    // });
+    // j$('div#out_Div').scroll(function() {
+    //     j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
+    // });
+    // j$('div#in_Div_L').scroll(function() {
+    //     j$('div#in_Div').scrollTop(j$(this).scrollTop());
+    // });
     // 20230523  ljh lightning end 
 });
 

--
Gitblit v1.9.1