viewHaifmMcda.htm 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>daMcdaView</title>
  5. <style type="text/css">
  6. .nav-top {
  7. position: inherit;
  8. /* position: fixed;
  9. top: 0;
  10. left: 0;
  11. right: 0; */
  12. border-bottom: 1px solid #ccc;
  13. display: flex;
  14. flex-direction: row;
  15. justify-content: space-around;
  16. /* margin-top:40px; */
  17. font-size:15px;
  18. }
  19. .cont-div {
  20. width: 100%;
  21. height: 100%;
  22. position: absolute;
  23. /* top: 82px;
  24. bottom: 40px; */
  25. overflow: hidden;
  26. margin:0px;
  27. padding: 0px !important;
  28. top: 0;
  29. left: 0;
  30. z-index: 1;
  31. }
  32. .cont-div>div{
  33. display: -webkit-box;
  34. -webkit-box-orient: vertical;
  35. }
  36. .cont-div>div>div{
  37. padding: 10px 0;
  38. }
  39. .cont-div div span:first-child {
  40. padding-right:20px;
  41. width:150px;
  42. }
  43. .nav-bottom {
  44. left: 0;
  45. right: 0;
  46. border-top: 1px solid #ccc;
  47. position: relative;
  48. bottom: 0;
  49. margin-bottom: 0;
  50. display: flex;
  51. flex-direction: row;
  52. justify-content: center;
  53. }
  54. .nav-bottom li {
  55. margin: 5px;
  56. background-color: #357BDC;
  57. width: 30px;
  58. height: 30px;
  59. border-radius: 100%;
  60. color: #ffffff;
  61. padding: 4px;
  62. }
  63. .nav-top li {
  64. padding: 10px;
  65. }
  66. .nav-bottom li::before {
  67. top: 4px;
  68. left: 0;
  69. position: relative;
  70. }
  71. /* 滚动条样式 */
  72. .iScrollVerticalScrollbar {
  73. position: absolute;
  74. z-index: 9999;
  75. width: 3px;
  76. bottom: 2px;
  77. top: 2px;
  78. right: 2px;
  79. overflow: hidden;
  80. padding: 0px !important;
  81. }
  82. .iScrollVerticalScrollbar.iScrollBothScrollbars {
  83. bottom: 18px;
  84. }
  85. .iScrollIndicator {
  86. position: absolute;
  87. right: 0;
  88. background: rgba(0, 0, 0);
  89. border: 2px solid rgba(0, 0, 0, 0.5);
  90. border-radius: 8px;
  91. }
  92. </style>
  93. <script type="text/javascript">
  94. $(function() {
  95. //返回
  96. $(".glyphicon-chevron-left").on("tap", function () {
  97. haifm.loadMobilePage("haifm", "haifmMain.htm?uuid=" + $("#uuid").val() + "&mcid=" + $("#mcid").val() + "&qyid=" + $("#qyid").val() +"&toList=1");
  98. })
  99. iscroll(".cont-div");
  100. $(".nav-bottom").on("click", "li.glyphicon", function() {
  101. var mcid = $("#mcid").val();
  102. var lx = $(this).data("for");
  103. if (lx == "delete") {
  104. var zsnum = $("#zsnum").val();
  105. if (zsnum > 0) {
  106. alert("无法删除此牧场,请先删除此牧场下的猪舍!");
  107. return;
  108. } else {
  109. if(confirm("确定要删除该牧场吗?删除成功后无法进行恢复!")) {
  110. jQuery.ajax({
  111. url : 'disableMcda.htm',
  112. dataType : 'json',
  113. type : 'post',
  114. cache : false,
  115. data : {"id" : mcid},
  116. success : function(data) {
  117. if (data.returnCode > 0) {
  118. alert("删除成功!");
  119. haifm.loadMobilePage("haifm", "haifmMain.htm?uuid=" + $("#uuid").val() + "&mcid=" + $("#mcid").val() + "&qyid=" + $("#qyid").val() +"&toList=1");
  120. } else {
  121. alert("删除失败!");
  122. }
  123. },
  124. error : function(data) {
  125. alert("系统异常!删除失败!");
  126. }
  127. });
  128. }
  129. }
  130. }
  131. if (lx == "update") {
  132. haifm.loadMobilePage("zslb", "haifmvDaEditMcda.htm?mcid=" + mcid);
  133. }
  134. if (lx == "add") {
  135. haifm.loadMobilePage("zslb", "haifmvDaMcdaFrame.htm?mcid=" + mcid);
  136. }
  137. });
  138. });
  139. /* 滚动事件 */
  140. function iscroll(classd){
  141. var mScroll = new IScroll(classd,{
  142. scrollbars: true,
  143. fadeScrollbars:true,
  144. shrinkScrollbars:'clip',
  145. scrollbars: 'custom',
  146. click:true,
  147. tap:true
  148. });
  149. setTimeout(function () {
  150. mScroll.refresh();
  151. }, 100);
  152. }
  153. </script>
  154. </head>
  155. <body>
  156. <div style="display: flex;flex-direction: column;flex: 1;">
  157. <input type="hidden" value="$!numOfExistZs" id="zsnum">
  158. <input type="hidden" value="$!daMcda.id" id="mcid">
  159. <header>
  160. <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
  161. <p>档案信息</p>
  162. <span class="glyphicon" aria-hidden="true" style="width: 18px;height: 18px;"></span>
  163. </header>
  164. <ul class="nav-top">
  165. <li class="active">牧场档案</li>
  166. </ul>
  167. <div class="middle">
  168. <main class="cont-div">
  169. <div>
  170. <div><span>牧场名称</span><span>$!daMcda.mcmc</span></div>
  171. <div><span>牧场电话</span><span>$!daMcda.mcdh</span></div>
  172. <div><span>牧场地址</span><span>$!daMcda.mcdz</span></div>
  173. <div><span>牧场邮编</span><span>$!daMcda.mcyb</span></div>
  174. <div><span>牧场传真</span><span>$!daMcda.mccz</span></div>
  175. <div><span>修改人</span><span>$!xgrxm</span></div>
  176. <div><span>修改时间</span><span>$!dateTool.format('yyyy-MM-dd', $!daMcda.xgsj)</span></div>
  177. </div>
  178. </main>
  179. </div>
  180. <ul class="nav-bottom">
  181. #if("$!daxx_mcda_update" == "true")
  182. <li class="glyphicon glyphicon-pencil" data-for="update"></li>
  183. #end
  184. #if("$!daxx_mcda_delete" == "true")
  185. <li class="glyphicon glyphicon-trash" data-for="delete"></li>
  186. #end
  187. #if("$!daxx_zsda_insert" == "true")
  188. <li class="glyphicon glyphicon-plus" data-for="add"></li>
  189. #end
  190. </ul>
  191. </div>
  192. </body>
  193. </html>