123
chenjingwu
2024-04-25 e51ecfffecfb1c85c69aa195fec14c5432ea0040
force-app/main/default/pages/MaintenanceProductData.page
@@ -1648,7 +1648,7 @@
                                                {!mp.mpded.ProductsID__r.Name}
                                            </td>
                                            <td class="dataCell">
                                                <apex:InputField value="{!exmpdDetailsRecordsMap[mp.mpded.ProductsID__c][0].mpdrdd.AgeLimit__c}" id="AgeLimit" />
                                                <apex:InputField value="{!exmpdDetailsRecordsMap[mp.mpded.ProductsID__c][0].mpdrdd.AgeLimit__c}" id="AgeLimit" onchange="ageLimitChange(this)"/>
                                            </td>
                                            <td class="dataCell">
                                                <apex:InputField value="{!exmpdDetailsRecordsMap[mp.mpded.ProductsID__c][0].mpdrdd.MultiOneYearWarrantyPrice__c}" id="MultiOneYearWarrantyPrice" />
@@ -1657,8 +1657,8 @@
                                                <apex:InputField value="{!exmpdDetailsRecordsMap[mp.mpded.ProductsID__c][0].mpdrdd.AmountWithheld__c}" id="AmountWithheld" />
                                            </td>
                                            <td>
                                                <apex:commandButton onclick="addJs();" value="添加" style="position:relative;width:100px;"/>
                                                <apex:commandButton onclick="deleteJs();" 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>
                                        <apex:repeat value="{!exmpdDetailsRecordsMap[mp.mpded.ProductsID__c]}" var="mu" id="bb1" first="1">
@@ -1673,8 +1673,8 @@
                                                    <apex:InputField value="{!mu.mpdrdd.AmountWithheld__c}" id="AmountWithheld" />
                                                </td>
                                                <td>
                                                    <apex:commandButton onclick="addJs();" value="添加" style="position:relative;width:100px;"/>
                                                    <apex:commandButton onclick="deleteJs();" value="删除" style="position:relative;width:100px;"/>
                                                    <apex:commandButton id="add1" onclick="addJs(this);" value="添加" style="position:relative;width:100px;"/>
                                                    <apex:commandButton id="delete1" onclick="deleteJs(this);" value="删除" style="position:relative;width:100px;"/>
                                                </td>
                                            </tr>
                                        </apex:repeat>
@@ -1726,6 +1726,14 @@
                    </apex:outputLabel>
                    
                </apex:pageblocksection>
                <script type="text/javascript">
                    function addJs(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 -->
            </apex:pageBlock>
        </apex:outputPanel>