Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. <apex:pageBlockTable value="{!WrapperOrder}" onclick="insert_numbers()" var="or" id="pbtable">
  2. <apex:column headerValue="No." >
  3. <apex:outputText value="{0}" style="text-align:center;">
  4. <apex:inputField value="{!or.rorli.Row_Num__c}" id="getindex" Style="width:15px" />
  5. <apex:param value="{!rowNumber+1}" />
  6. </apex:outputText>
  7. </apex:column>
  8. <apex:column headerValue="Nicomatic P/N" >
  9. <apex:inputField value="{!or.rorli.Name}" id="pnname" required="true" styleClass="theqid"/>
  10. </apex:column>
  11.  
  12. <apex:column headerValue="Client P/N" >
  13. <apex:inputField value="{!or.rorli.Client_Pn__c}" Style="width:110px" />
  14. </apex:column>
  15. <apex:column headerValue="Description" >
  16. <apex:inputField value="{!or.rorli.Description__c}"/>
  17. </apex:column>
  18. <apex:column headerValue="Confirmed Shipping Date" >
  19. <apex:inputField value="{!or.rorli.Confirmed_Shipping_Date__c}"/>
  20. </apex:column>
  21.  
  22. <apex:column headervalue="Batch Price and Quantity" >
  23. <table border="1px">
  24. <tr>
  25. <th>Price</th>
  26. <th>Quantity</th>
  27. <th>Action</th>
  28. </tr>
  29. <apex:repeat value="{!or.batc}" var="ba" >
  30. <tr>
  31. <td>{!ba.Unit_Price__c}</td>
  32. <td>{!ba.Asked_Qty__c}</td>
  33. <td><input type="checkbox" onclick="" id="checx" class="checx"/></td>
  34. </tr>
  35. </apex:repeat>
  36. </table>
  37. </apex:column>
  38. <apex:column headerValue="Unit Price" >
  39. <!-- <input type="text" id="two" value="{!or.rorli.Price__c}" Style="width:60px" name="two" /> -->
  40. <apex:inputField id="rpri" value="{!or.rorli.Price__c}" Style="width:50px" styleClass="spri[rowNumber]" />
  41.  
  42. </apex:column>
  43. <apex:column headerValue="Qty" id="col" >
  44. <!--<input type="text" id="one" value="{!or.rorli.Quantity__c}" Style="width:60px" name="one" /> -->
  45. <apex:inputField id="rqty" value="{!or.rorli.Quantity__c}" Style="width:25px" styleClass="sqty[rowNumber]"/>
  46. </apex:column>
  47. </apex:pageblocktable>
  48. <script type="text/javascript">
  49. checkboxes = document.getElementsByClassName("checx");
  50. for (var i = 0; i < checkboxes.length; i++) {
  51. var checkbox = checkboxes[i];
  52. checkbox.onclick = function() {
  53. var currentRow = this.parentNode.parentNode;
  54. var secondColumn = currentRow.getElementsByTagName("td")[1];
  55. var FirstColumn = currentRow.getElementsByTagName("td")[0];
  56. alert("My text is: " + secondColumn.textContent +" "+FirstColumn.textContent);
  57. $('.sqty').val(secondColumn.textContent);
  58. $('.spri').val(FirstColumn.textContent);
  59.  
  60. };
  61. }
  62.  
  63. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement