From e51ecfffecfb1c85c69aa195fec14c5432ea0040 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 25 四月 2024 11:58:15 +0800
Subject: [PATCH] 123

---
 force-app/main/default/pages/MaintenanceProductData.page |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/force-app/main/default/pages/MaintenanceProductData.page b/force-app/main/default/pages/MaintenanceProductData.page
index b32ae2d..558acb7 100644
--- a/force-app/main/default/pages/MaintenanceProductData.page
+++ b/force-app/main/default/pages/MaintenanceProductData.page
@@ -1657,7 +1657,7 @@
                                                 <apex:InputField value="{!exmpdDetailsRecordsMap[mp.mpded.ProductsID__c][0].mpdrdd.AmountWithheld__c}" id="AmountWithheld" />
                                             </td>
                                             <td>
-                                                <apex:commandButton id="add" onclick="addJs();" value="娣诲姞" style="position:relative;width:100px;"/>  
+                                                <apex:commandButton id="add" onclick="addJs(this);" value="娣诲姞" style="position:relative;width:100px;"/>  
                                                 <apex:commandButton id="delete" onclick="deleteJs();" value="鍒犻櫎" style="position:relative;width:100px;"/>
                                             </td>
                                         </tr>
@@ -1728,7 +1728,10 @@
                 </apex:pageblocksection>
                 <script type="text/javascript">
                     function addJs(el){
-                        console.log(el);
+                        if(el.id){
+                            var index = el.id.substring(el.id.lastIndexOf('aa:') + 1,el.id.length - 1);
+                        }
+                        console.log(index);
                     }
                 </script>
                 <!-- chenjingwu 20240417 end -->

--
Gitblit v1.9.1