viewHaifmDaxx.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <title>栏期</title>
  8. <style type="text/css">
  9. .nav-top {
  10. margin-top:40px;
  11. }
  12. </style>
  13. <script type="text/javascript">
  14. $(function() {
  15. loadDaxx("Zsda");
  16. $("#zsbt").on("click", "li", function() {
  17. var zsid = $("#zsid").val();
  18. if (zsid == undefined || zsid == "") {
  19. if ($(this).data("for") != "Zsda") {
  20. alert("请先新建猪舍!");
  21. }
  22. return false;
  23. }
  24. loadDaxx($(this).data("for"));
  25. $("#zsbt li").removeClass("active");
  26. $(this).addClass("active");
  27. });
  28. });
  29. function loadDaxx(type) {
  30. var zsid = $("#zsid").val();
  31. if (zsid == undefined || zsid == "") {
  32. if (type == "Zsda") {
  33. haifm.loadMobilePage("daxx", "haifmDaEdit" + type + ".htm?mcid=" + $("#mcidstr").val());
  34. }
  35. } else {
  36. haifm.loadMobilePage("daxx", "haifmDaView" + type + ".htm?zsid=" + zsid);
  37. }
  38. }
  39. </script>
  40. </head>
  41. <body>
  42. <input type="hidden" id="zsid" value="$!zsid" />
  43. <input type="hidden" id="mcidstr" value="$!mcid" />
  44. <ul class="nav-top" id="zsbt">
  45. <li class="active" data-for="Zsda">猪舍档案</li>
  46. <li class="" data-for="Lqda">栏期档案</li>
  47. <li class="" data-for="Sbpz">设备配置</li>
  48. </ul>
  49. <div id="daxx"></div>
  50. </body>
  51. </html>