bom.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  4. <head>
  5. <link rel="stylesheet" href="{{ url_for('static',filename='css/ul.css') }}">
  6. <ul>
  7. <li><a href="../" class="active">首頁</a></li>
  8. <li><a href="{{ url_for('productinfo') }}">檢查產品清單</a></li>
  9. <li><a href="{{ url_for('form') }}">新增產品清單</a></li>
  10. <li><a href="{{ url_for('check') }}">查詢產品清單</a></li>
  11. <li><a href="{{ url_for('bom') }}">建立BOM清單</a></li>
  12. <li><a href="../register">註冊</a></li>
  13. <li><a href="{{ url_for('login') }}">登入</a></li>
  14. <li><a href="../logout">登出</a></li>
  15. </ul>
  16. <br>
  17. </head>
  18. <body>
  19. <br>
  20. <table id="mt" border="1" cellpadding="5" cellspacing="0">
  21. <thead>
  22. <th>產品編號</th>
  23. <th>產品名稱</th>
  24. </thead>
  25. <tbody></tbody>
  26. <p><input type = "button" id="add" value = "新增" /></p>
  27. <p><input type = "button" id="del" value = "刪除" /></p>
  28. </table>
  29. <form action="{{ url_for('bom') }}" method="POST">
  30. <fieldset>
  31. <legend>BOM組合清單</legend>
  32. <select name="test1" style="width:100px;">
  33. <tr>
  34. {% for i1 in labels %}
  35. <option>{{i1}}</option>
  36. {% endfor %}
  37. </tr>
  38. </select>
  39. <select name="test2" style="width:100px;">
  40. <tr>
  41. {% for i1 in labels %}
  42. <option>{{i1}}</option>
  43. {% endfor %}
  44. </tr>
  45. </select>
  46. <select name="test3" style="width:100px;">
  47. <tr>
  48. {% for i1 in labels %}
  49. <option>{{i1}}</option>
  50. {% endfor %}
  51. </tr>
  52. </select>
  53. <p><input type = "submit" value = "建立" /></p>
  54. </fieldset>
  55. </form>
  56. <script type="text/javascript">
  57. var tag = 1;
  58. $(function(){
  59. $("#add").click(function(){
  60. $('#mt tbody').append('<tr><td>A0000'+tag+'</td><td><input type = "text"/></td></tr>');
  61. tag++;
  62. });
  63. $("#del").click(function(){
  64. $("#mt tbody tr:last").remove();
  65. });
  66. })
  67. </script>
  68. </body>
  69. </html>