Guest User

Untitled

a guest
Mar 6th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. $scope.estoque = JSON.parse(data.data);
  2.  
  3. $scope.estoqueJSON = data.data;
  4.  
  5. [
  6. {
  7. "EstoqueId": 553,
  8. "DescricaoEstoque": null,
  9. "NomeMaterial": "Cabo de Fibra Óptica 04FO Multimodo - Indoor / Outdoor - 62,5/125 Furukawa",
  10. "CodigoMaterial": "100",
  11. "Ni": "",
  12. "QtdMaterial": 3.0,
  13. "QtdMin": 0.0,
  14. "Unidade": "m",
  15. "MaterialId": 1
  16. }
  17. ]
  18.  
  19. <table st-table="estoqueStr" st-set-filter="myStrictFilter" class="table table-striped table-responsive">
  20. <thead style="text-align:center;">
  21. <tr>
  22. <th st-sort="CodigoMaterial" style="width:20px; font-weight:bold; text-align:center;">Código</th>
  23. <th st-sort="Ni" style="width:20px; font-weight:bold; text-align:center;">Ni</th>
  24. <th st-sort="NomeMaterial" style="width:20px; font-weight:bold; text-align:center;">Material</th>
  25. <th st-sort="Unidade" style="width:20px; font-weight:bold; text-align:center;">UNI.</th>
  26. <th st-sort="QtdMaterial" style="width:20px; font-weight:bold; text-align:center;">Qtd</th>
  27. <th st-sort="QtdMin" style="width:20px; font-weight:bold; text-align:center;">Qtd Min.</th>
  28. </tr>
  29. <tr>
  30. <th style="width:20px;">
  31. <input style="text-align:center;" st-search="CodigoMaterial" placeholder="Código material" class="input-sm form-control" type="search" />
  32. </th>
  33. <th style="width:20px; text-align:center;">
  34. <input style="text-align:center;" st-search="Ni" placeholder="Ni" class="input-sm form-control" type="search" />
  35. </th>
  36. <th style="width:auto; text-align:center;">
  37. <input style="text-align:center;" st-search="NomeMaterial" placeholder="Nome material" class="input-sm form-control" type="search" />
  38. </th>
  39. <th style="width:10px; text-align:center;">
  40. <input style="text-align:center;" st-search="Unidade" placeholder="Unidade" class="input-sm form-control" type="search" />
  41. </th>
  42. <th style="width:10px; text-align:center;">
  43. <input style="text-align:center;" st-search="QtdMaterial" placeholder="Qtde atual" class="input-sm form-control" type="search" />
  44. </th>
  45. <th style="width:10px; text-align:center;">
  46. <input style="text-align:center;" st-search="QtdMin" placeholder="Qtde mínima" class="input-sm form-control" type="search" />
  47. </th>
  48.  
  49. </tr>
  50. </thead>
  51. <tbody id="" class="">
  52. <tr ng-repeat="e in estoqueJSON | filter : paginate | orderBy:sortType:sortReverse | filter:searchField track by $index">
  53. <td ng-repeat-start="item in e.value"></td>
  54. <td style="text-align:center;">{{item.CodigoMaterial}}</td>
  55. <td style="text-align:center;">{{item.Ni}}</td>
  56. <td>{{item.NomeMaterial}}</td>
  57. <td style="text-align:center;">{{item.Unidade}}</td>
  58. <td style="text-align:right; color:black;">
  59. <span e-form="tableform" editable-number="e.QtdMaterial" onbeforesave="checkQtdEstoque(e, $data)">{{item.QtdMaterial}}</span>
  60. </td>
  61. <td style="text-align-last:right; color:black;" ng-repeat-end>
  62. <span editable-number="e.QtdMin" e-form="tableform" onbeforesave="checkQtdMin(e, $data)">{{item.QtdMin}}</span>
  63. </td>
  64.  
  65. </tr>
  66. </tbody>
  67. </table>
  68.  
  69. <tr ng-repeat="row in displayedCollection">
  70. <td>{{row.firstName}}</td>
  71. <td>{{row.lastName}}</td>
  72. <td>{{row.birthDate}}</td>
  73. <td>{{row.balance}}</td>
  74.  
  75. scope.rowCollection = [
  76. {firstName: 'Laurent', lastName: 'Renard', birthDate: new Date('1987-05-21'), balance: 102, email: 'whatever@gmail.com'},
  77. {firstName: 'Blandine', lastName: 'Faivre', birthDate: new Date('1987-04-25'), balance: -2323.22, email: 'oufblandou@gmail.com'},
  78. {firstName: 'Francoise', lastName: 'Frere', birthDate: new Date('1955-08-27'), balance: 42343, email: 'raymondef@gmail.com'}
  79. ];
Add Comment
Please, Sign In to add comment